Hi,
The below is a continuation of a conversation started in the comments section of a recent membership tutorial with author Agnes Bury - https://toolset.com/2016/10/create-membership-site-toolset-new-tutorials-available/comment-page-1/#comment-306091.
Objective: Use a Toolset User Form and WooCommerce Subscriptions to support the creation of a paid membership community. I want to use the User Form to collect information such as name, gender/sex, nationality, etc. I then want to use Ultimate Member to display the information via user profiles.
I set up a Toolset User Form using the following steps:
1. Add a user field (in Types)
2. Create a User Form (CRED) that includes that field
3. Connect this form with WooCommerce payment
4. Create a page with that form
5. Submit the form, filling out the user field you created in #1.
6. Fill out the WooCommerce form.
7. Mark the WooCommerce order as completed.
I have the following fields:
- Nationality (wpcf-nationality) – a Types User Field of type Radio
- Top Activates (top_activities) – a Types Generic Field of type Multi-select
- Sex (sex) – a Types Generic Field of type Radio
NB part of the reason I am using Generic Fields is because Types does not support mulit-select User Fields - https://toolset.com/forums/topic/multiselect-user-fields-2/.
My User Form code is as follows:
[creduserform class='cred-user-form cred-keep-original']
[cred_field field='form_messages' value='']
<div class="cred-field cred-field-first_name">
<label class="cred-label">First Name</label>
[cred_field field='first_name' post='user' value='' urlparam='']
</div>
<div class="cred-field cred-field-last_name">
<label class="cred-label">Last Name</label>
[cred_field field='last_name' post='user' value='' urlparam='']
</div>
<div>
<label class="cred-label">Nationality</label>
[cred_field field='nationality' post='user' value='' urlparam='']
</div>
<div>
<label class="cred-label">Gender</label>
[cred_generic_field field='sex' type='radio' class='' urlparam='']
{
"required":0,
"validate_format":0,
"persist":1,
"default":[],
"options":[
{"value":"male","label":"Male"},
{"value":"female","label":"Female"}
]
}
[/cred_generic_field]
</div>
<div>
<label class="cred-label">Top Activities</label>
[cred_generic_field field='top_activities' type='multiselect' class='' urlparam='']
{
"required":0,
"validate_format":0,
"persist":1,
"default":[],
"options":[
{"value":"managing","label":"managing"},
{"value":"analysing","label":"analysing"},
{"value":"writing","label":"writing"}
]
}
[/cred_generic_field]
</div>
<div class="cred-field cred-field-user_email">
<label class="cred-label">Email</label>
[cred_field field='user_email' post='user' value='' urlparam='']
</div>
<div class="cred-field cred-field-user_pass">
<label class="cred-label">Password</label>
[cred_field field='user_pass' post='user' value='' urlparam='']
</div>
<div class="cred-field cred-field-user_pass2">
<label class="cred-label">Repeat Password</label>
[cred_field field='user_pass2' post='user' value='' urlparam='']
</div>
[cred_field field='form_submit' value='Pay' urlparam='']
[/creduserform]
When using my User Form and WooCommerce, Nationality is stored – I can see it using a plugin the displays usermeta. However, it does not display on the Ultimate Member profile. Top Activities and Sex are not stored at all. However, when I use THE SAME FORM without WooCommerce, I get different results. I still get the same result for Nationality, but this time Top Activities and Sex are both viewable via the usermeta – hidden link – AND the Ultimate Member profile – hidden link. This would seem to suggest that the combination of Toolset CRED and WooCommerce is not working properly.
I am happy to give you admin access to my site, if that would help.
Thanks,
Richard