As of USP Pro version 1.7, it is possible to override the global settings for submitting posts, registering new users, and sending email via contact form. This quick tutorial explains how it’s done.

Hidden fields

Using USP Pro’s hidden fields, it’s possible to override any global settings and create multiple forms for post submission, user registration, and contact forms. This granular control is made possible using the following hidden fields:

Post Submission   -> <input name="usp-is-post-submit" value="1" type="hidden">
User Registration -> <input name="usp-is-register" value="1" type="hidden">
Contact Form      -> <input name="usp-is-contact" value="1" type="hidden">

By default, all USP Forms submit posts. So if that is the type of form that is required, then you do not need to add any hidden field. The usp-is-post-submit field is required only when creating combination forms, as described below. Here is a list of the types of forms that can be created, along with the hidden fields required to do so.

  • Post Submission – (default) no hidden field required
  • Registration Form – add the usp-is-register hidden field
  • Contact Form – add the usp-is-contact hidden field
  • Combo Register/Contact – add usp-is-register and usp-is-contact hidden fields
  • Combo Register/Submit Post – add usp-is-register and usp-is-post-submit hidden field
  • Combo Contact/Submit Post – add usp-is-contact and usp-is-post-submit hidden field
  • Combo Contact/Register/Submit – add all three hidden fields to any form
Important!

It’s not enought to just add a hidden field and call it a day — you also need to include any necessary fields to the form. For example, to submit posts it is necessary to include a Name, Title, and Content, like so:

[usp_name]
[usp_title]
[usp_content]

Likewise for other forms; for example, registration forms should include a Name and Email fields, and contact forms should include a Name, Email, and Subject fields. If you notice any blank values in your posts or elsewhere, check that the form includes fields to collect the information. Of course, other tags and markup may be added to any form as required to achieve the desired results.

Example

Let’s look at a quick example of how to create a combo form that submits posts and registers users. To achieve this, build your form as needed and then add these two hidden fields:

<input name="usp-is-register" value="1" type="hidden">
<input name="usp-is-post-submit" value="1" type="hidden">

To reiterate, if this were just a post-submission form, we would not need to add any custom fields, because by default all forms are post-submission forms. Likewise, if this form were just for registering users, we would only need the usp-is-register field. In other words, the post-submit field is only required for combo forms. Learn more about submitting posts and registering users.

These new hidden fields give you fine-grained control over the types of forms that you can build with USP Pro. To see them in action, delete and regenerate the form demos under the USP Forms menu.