Theme My Login custom registration and profile fields
-
I am trying to create a custom registration (and therefore profile) form using Theme My Login. The code here is completely different to that shown in the Plugins API, so I am after some help.
I have the following example code:
<p> <label for="user_customfield<?php $template->the_instance(); ?>"><?php _e( 'Custom Field*:', 'theme-my-login' ) ?></label> <input type="text" name="user_customfield" id="user_customfield<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'user_customfield' ); ?>" size="20" /> </p>
Added to the registration form it shows in the correct place but what I can’t get it to do is a) error validate and b) save the data that has been entered as when I login with the new user and view the profile (code below) there is nothing stored in the entry.
<tr> <th><label for="customfield"><?php _e( 'Custom Field*:', 'theme-my-login' ) ?></label></th> <td><input type="text" name="customfield" id="customfield" value="<?php echo esc_attr( $profileuser->user_customfield ) ?>" class="regular-text" /></td> </tr>
How do I go about checking for input and ensuring it is saved?
- The topic ‘Theme My Login custom registration and profile fields’ is closed to new replies.