I am using wp-members 2.8.1 with wp 3.5.
I want to customize the form buttons and last required label.
I tried with sample code and suggestion by you for custom filter, posted here http://wordpress.org/support/topic/plugin-wp-members-customize-submit-button, it worked for changing button text.
But to customize the html to a larger extent, its not working.
I have used following code:
add_filter( 'wpmem_register_form', 'my_submit_button_filter' );
function my_submit_button_filter( $string ) {
$needle = '<div class="button_div">
<input name="reset" value="Clear Form" class="buttons" type="reset">
<input name="submit" value="Submit" class="buttons" type="submit">
</div>
<font class="req">*</font>Required field';
$replacement = '<div class="button_div">
<input type="reset" class="btn" value="Clear Form" name="reset" style="float:right;">
<input type="submit" class="btn btn-primary" value="Register" name="submit" style="float:left;">
<div style="clear:both"></div>
</div>
<div class="reqnote"><span class="req">*</span>Required field</div>';
$string = str_replace( $needle, $replacement, $string );
return $string;
}
But its not working!! The html for needle I directly copied from firebug and also from view-page-source, so it should match and replace as required.
Could you please let me know what I am doing wrong? I need it to make button aligned horizontally below form and 'required' label to make more space. Please help.