Many times you’ll want to have different values in a form on one page versus another page. But don’t want to use a bunch of If/Else statements in your code. Or have unnecessary duplication. So what’s a developer to do? Continue reading to find out.

Use The Html.Hidden() Function

The Html.Hidden() function is a part of HTML that allows you to create hidden fields in your forms. Hidden fields are invisible to the user, but their values are still available. This is useful in a number of situations. One very common use is to have a blog post’s featured image hidden from the main page’s articles when you’re on a sidebar or archive page. You can also use these hidden fields to store extra information about a customer without having to use a cookie. Or to simply have a value other than “0” (zero) in a form field for a specific page. You can read more about hidden fields in HTML here.

Make Use Of The Js Function

The Js Function is a part of JavaScript that allows you to execute JavaScript code inside of your pages. The Js Function was initially created for use in Google Analytics, but it’s useful in a variety of situations. You can use it to automatically fill in a form field with the contents of a select box (such as a country or state) when a user submits the form. Or to make an entire form field optional (such as a subject for a blog post). You can read more about JS here.

Create A Page Array

If you’re using the Seven Figure Webinar’s free form generator, you’ll notice that each form has a page array associated with it. The page array holds a list of all the pages that this form can be used for. When you have a form with multiple pages, you can designate which page this form should be used for by simply choosing an array entry from the page drop-down menu. Once you’ve chosen a page, you can change the form’s behavior using the Options panel.

Use A Custom CSS Class

To make a form field stand out, you can give it a custom CSS class. For example, you may want to give all the form fields with email addresses a class of “form-field-lg” to make them stand out from the rest of the form fields. You can go the extra mile and make the whole form stand out by using the “form-field-contain” CSS class. You may also want to add some padding or a border to the form fields with this class. You can read more about CSS here.

Use The “data-form-field-lg” Attribute

If you’re creating your own forms or integrating Seven Figure Webinar’s form builder with your existing forms, you may want to replace the placeholder text in the input field with an icon or image. For example, you may want to replace “Name” with so that when a user clicks on the input field, they’ll be taken to a page with a map of the United States. You can read more about the data-form-field-lg attribute here.

Use The Remodeled HTML Form

Remodeled HTML forms are those that use the HTML 5 form attribute. If a user encounters a broken link or button while on your site, they’ll likely leave and never return. To retain them as customers, you may want to use the HTML Remodeled form. It takes some of the guesswork out of form building. You simply choose your preferred delivery method (email or snail mail), type in the recipient’s email address, and you’re done! You can learn more about the HTML 5 form attribute and the remodeled HTML form here.

Check Out These Useful Tips

Now that you know how to capture page form values for a specific page in a form, you may want to consider these tips: