Home › Forums › Quform WordPress › After 2.0.1 update, I cann't use user information at dynamic default value.
- This topic has 1 reply, 2 voices, and was last updated 8 years ago by
Ally.
- AuthorPosts
- September 14, 2017 at 4:04 pm #21948
pedkbm
ParticipantHi,
I used a form created with QuForm(1.x) in a page accessible only to registered users.
After 2.0.1 update, I cann’t use user information at dynamic default value.I need that the form send me user information about name and surname etc(wp-members fields).
Now settings QuForm only allow me to have the user username and email address (hidden field).
Can you help me?
Thanks a lot,
———————————————————-Quform 1.x
Add this code to your theme functions.php or create a plugin for it:function my_user_firstname($value)
{
return iphorm_get_current_userinfo(‘user_firstname’);
}
add_filter(‘iphorm_element_value_firstname’, ‘my_user_firstname’);function my_user_lastname($value)
{
return iphorm_get_current_userinfo(‘user_lastname’);
}
add_filter(‘iphorm_element_value_lastname’, ‘my_user_lastname’);Add a Hidden field to the form, and in the Settings for it tick “Dynamic default value” and enter the Parameter Name: firstname
Add another Hidden field to the form, and in the Settings for it tick “Dynamic default value” and enter the Parameter Name: lastname
Regards
AllySeptember 18, 2017 at 5:13 pm #21987Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.