Viewing 1 replies (of 1 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    I would say that the easiest way to approach that would be to add a new required field markup somewhere in the beginning of the form. You could use wpmem_register_form_before (but that might be too early – before the heading), wpmem_register_form, or possibly slip some HTML in as part of the wpmem_register_form_args fieldset_before or main_div_before argument.

    Then you could use wpmem_register_form_args to also remove the original markup.

    So maybe something like this to just use the wpmem_register_form_args filter:

    add_filter( 'wpmem_register_form_args', 'my_register_form_args' );
    function my_register_form_args() {
    	// required field HTML (change as desired)
    	$req_field = '<div class="req-text">Required field<font class="req">*</font></div>';
    
    	$args = array(
    		//add req field html after the main_div_before tag
    		'main_div_before'  => '<div id="wpmem_reg">' . $req_field,
    
    		// empty the regular required field markup
    		'req_mark'         => '',
    		'req_label'        => '',
    		'req_label_before' => '',
    		'req_label_after'  => '',
    	);
    	return $args;
    }
Viewing 1 replies (of 1 total)

The topic ‘Move *Required Field Text to top’ is closed to new replies.