• Resolved adnanshawkat

    (@adnanshawkat)


    Hi there,

    I’ve been using your plugin for over a year I think so for my themes login & registration purpose. Now suddenly your update just crashed my theme. It no longer supports custom template. So I’d to create form fields the way you’ve suggested using add_form_field option. But I’m a little bit confused about the doc. There are nothing written about how to use other field types like radio/dropdown/radio-groups.

    Can you please help me here so that I can finish up resolving issues here. The doc has no pages regarding the form fields. Very likely to have your help here.

    Thanks & Best Regards

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    For dropdowns, consider the following code:

    
    tml_add_form_field( 'register', 'country', array(
    	'type' => 'dropdown',
    	'value' => tml_get_request_value( 'country', 'post' ),
    	'options' => array(
    		'US' => 'United States',
    		'CA' => 'Canada',
    		// etc
    	),
    ) );
    

    Likewise with radio groups:

    
    tml_add_form_field( 'register', 'yes_or_no', array(
    	'type' => 'radio-group',
    	'value' => tml_get_request_value( 'yes_or_no', 'post' ),
    	'options' => array(
    		'yes' => 'Yes',
    		'no' => 'No',
    	),
    	'render_args' => array(
    		'control_before' => '<p>Are you interested in our service?</p>',
    	),
    ) );
    
Viewing 1 replies (of 1 total)

The topic ‘Custom Form Fields’ is closed to new replies.