Hi, I have seller listings on my portal. Visitors need to request contact details to be able to connect the listing providers. There are 2 scenarios out here. A) Non Logged In users B) Logged in Users.
The contact request form remains same for both, however, for the logged in users, I want the form to be partially pre-filled ie, with their name, number, email and they just need to give some additional info vis a vis - non logged in users.
I assume there is a Toolset Form to publish posts underlying this (e.g. to publish "contact requests" or similar).
You can set the value attribute with a shortcode that outputs the relevant field for the current user, or you may be using generic fields in the form if you don't need to save the details, something like:
[cred_generic_field type='email' field='email-address']
{
"required":0,
"validate_format":0,
"default":"[wpv-user field="user_email"]"
}
[/cred_generic_field]
// or for a Types field
[cred_field field="email-address" value='[wpv-user field="user_email"]']
In any case, if a guest user visits such a form, the wpv-user or types user_meta shortcodes won't output anything, and so the default value will simply be blank.
You should be able to output the shortcode in the correct format simply by using the Fields and Views button.