USP Pro enables users to register and submit content at the same time. Here’s how to set it up.
Video Tutorial
Check out more video tutorials for USP Pro »
Written Tutorial
This tutorial explains how to create a form that submits posts and registers a user. So the person visiting your form will be able to register and submit content at the same time. This tutorial provides minimum requirements for setting up a combo submit/register form. Feel free to get creative and customize things as needed. Check out the Related posts at the end of this tutorial for more information.
Step 1
Add the usual post-submit fields to your form:
[usp_name]
[usp_title]
[usp_content]
You can either copy/paste these shortcodes directly, or use the Quicktags provided on the “Edit USP Form” screen.
Step 2
To register users, the form must also include — at minimum — an Email field:
[usp_email]
You can add the Email shortcode by copy/pasting directly, or by using the USP:Email Quicktag provided on the “Edit Form” screen.
At this point, our combo form includes the minimum field requirements: Name, Title, Content, and Email. Time to make it official..
Step 3
The last step to create our combo submit-post/register-user form is to add the required hidden fields:
<input name="usp-is-register" value="1" type="hidden">
<input name="usp-is-post-submit" value="1" type="hidden">
After including these hidden fields anywhere in the form, we have accomplished our mission: a form that will submit a post and register the user at the same time. As a bonus, let’s add some custom user fields to make registration something special.
Step 4 (optional)
To collect more than just the user’s name and email address during registration, let’s take advantage of some custom user fields. Using this screenshot to give you a general idea, define six custom fields using the following six custom field values:
name#nicename|for#nicename|label#Nicename|placeholder#Nicename
name#displayname|for#displayname|label#Display Name|placeholder#Display Name
name#nickname|for#nickname|label#Nickname|placeholder#Nickname
name#firstname|for#firstname|label#First Name|placeholder#First Name
name#lastname|for#lastname|label#Last Name|placeholder#Last Name
name#description|for#description|label#Description|placeholder#Description
Feel free to modify the custom-field parameters as desired. Once you’ve defined the custom fields (and saved the changes!), include them in the form using the following shortcodes:
[usp_custom_field form="123" id="1"]
[usp_custom_field form="123" id="2"]
[usp_custom_field form="123" id="3"]
[usp_custom_field form="123" id="4"]
[usp_custom_field form="123" id="5"]
[usp_custom_field form="123" id="6"]
123
with the ID or slug of your USP Form. Likewise, the id
of each of these shortcodes should correspond with a specific custom field (see screenshot).That’s all there is to it. As a bonus, don’t forget that it can be nice to “remember” form values, especially when numerous fields are included in the form. With USP Pro, you can simply add:
[usp_remember]
..to remember form values. So if there is an error when the form is submitted, the user won’t have to refill the entire form. Learn more about remembering field values »
Final code
Here is the final copy/paste code for a combo post-submit/user-register USP Form:
[usp_name]
[usp_title]
[usp_content]
[usp_email]
[usp_custom_field form="123" id="1"]
[usp_custom_field form="123" id="2"]
[usp_custom_field form="123" id="3"]
[usp_custom_field form="123" id="4"]
[usp_custom_field form="123" id="5"]
[usp_custom_field form="123" id="6"]
[usp_remember]
<input name="usp-is-register" value="1" type="hidden">
<input name="usp-is-post-submit" value="1" type="hidden">
..and for it’s associated custom-field definitions:
name#nicename|for#nicename|label#Nicename|placeholder#Nicename
name#displayname|for#displayname|label#Display Name|placeholder#Display Name
name#nickname|for#nickname|label#Nickname|placeholder#Nickname
name#firstname|for#firstname|label#First Name|placeholder#First Name
name#lastname|for#lastname|label#Last Name|placeholder#Last Name
name#description|for#description|label#Description|placeholder#Description
You now have a Combo form that submits content and registers the user.