Posted: February 19, 2016 at 1:34 pm
|
Hi There, how can i link or how to i link the fiels from the custom questions to the wp_user_meta data? for example, when an logged in user is requerd to give his firstname or lastname this is prefilled. for example i want to prefill the user adres field. How can I arrange this? |
This will not add the address info to the user_meta, but it will pre-fill the address fields if they’ve filled them out before from any earlier registration: |
|
|
Hi Josh, thanks for the reply. can u confirm; i full one time all the custom question fields in for the first registration. 2nd registration the custom fields are pre filled. |
Address fields, City, State, Zip > Yes. Other custom questions, no. If you also need to pre-fill custom questions too that are not system questions, you’ll use this code: |
|
|
i want to also the other custom questions to be prefilled. |
Hi Victor, A functions.php file can be used if you are using a child theme. If you are not using a child theme, then your customizations to the functions.php file will be lost when you update your theme. A site specific plugin is a good option as it won’t be affected by updates to your theme: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ — |
|
|
Hi Lorenzo, |
You add some more code to handle the phone number field like in this example: |
|
|
hi Josh, thanks for the reply, can u tell me abit more? |
Hi Victor, Josh shared an example here: https://eventespresso.com/topic/howto-link-custom-question-link-to-the-wp-user-profile/#post-193328 You could then extend it (make an addition) to pickup the phone number by adding another variable and then a case at the end. See the red text in this screenshot: https://monosnap.com/file/9vnATlxCx2Purks4O2gUM9WpCh9UKb — |
|
The support post ‘howto link custom question link to the wp user profile’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.