Plugin Planet

Premium WordPress Plugins

USP Pro enables users to register and submit content at the same time. Here’s how to set it up.

Note: this tutorial shows only the minimum requirements for setting up a combo submit/register form. Feel free to elaborate with more form fields and customize things as needed.

Step 1

Add the minimum required code for submitting a post:

[usp_name]
[usp_title]
[usp_content]

Step 2

To register users, the form must also include — at minimum — an Email field, which may be added using direct markup or more simply using the shortcode:

[usp_email]

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 as a guide, 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"]

Note: replace form value 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. Done.

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 fields:

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

Happy form building :)

Related: