tml_add_form_field( 'register', 'country', array(
'type' => 'dropdown',
'label' => 'Country',
'options' => array(
'US' => 'United States',
'CA' => 'Canada',
//etc
),
'value' => tml_get_request_value( 'country', 'post' ),
);
Thank you! This works great, but is putting it after the submit button for some reason. Any idea why? My code:
function add_tml_registration_form_fields() {
tml_add_form_field( 'register', 'user_login', array(
'type' => 'text',
'label' => 'Choose a Username',
'value' => tml_get_request_value( 'user_login', 'post' ),
'id' => 'user_login',
'priority' => 15,
) );
tml_add_form_field( 'register', 'first_name', array(
'type' => 'text',
'label' => 'First Name',
'value' => tml_get_request_value( 'first_name', 'post' ),
'id' => 'first_name',
'priority' => 15,
) );
tml_add_form_field( 'register', 'last_name', array(
'type' => 'text',
'label' => 'Last Name',
'value' => tml_get_request_value( 'last_name', 'post' ),
'id' => 'last_name',
'priority' => 15,
) );
tml_add_form_field( 'register', 'membership', array(
'type' => 'dropdown',
'label' => 'Are you an Active or Retired Member?',
'value' => tml_get_request_value( 'membership', 'post' ),
'options' => array(
'1' => 'Active Member',
'2' => 'Retired Member',
),
) );
}
add_action( 'init', 'add_tml_registration_form_fields' );
Sorry, you will need to add a priority to the field as well.
Nevermind, as soon as I posted this I saw I was missing the priority. Thanks again for your help!