Populate custom fields on account page
-
I added custom fields to the Account tab that correspond to the additional information we capture during the registration process. On submit the new fields update the database successfully. However, I am struggling with loading the current information in the fields when users visit their account page.
For instance, we capture a Company Name during registration. I have added a text input field to the account tab that successfully updates the meta_value for that key when the form is submitted. I would like the field to be populated with the current Company name when the page loads. Any help would be greatly appreciated. Here is my current code:
add_action('um_after_account_general', 'um_account_tab_add'); function um_account_tab_add( ) { ?> <div class="um-field um-field-company" data-key="company"> <div class="um-field-label"> <label for="company">Company</label> <div class="um-clear"></div> </div> <div class="um-field-area"> <input class="um-form-field valid " type="text" name="company" id="company" placeholder="" data-validate data-key="company"> </div> </div> <?php }
Thank you
- The topic ‘Populate custom fields on account page’ is closed to new replies.