LoginLogin About

Support » Knowledge Base » Contacts »

Setting fields as "required" for a sign-up form

If you want your website visitors to always complete certain fields when submitting their data using a sign-up form, make such fields required. To do so, use the 2nd publication method "javascript and <form>" for the sign-up form as described below:

  1. Copy the code contained in the text area under caption "javascript and <form>" on the form preview page.
  2. Paste the copied code to the HTML source of your website.
  3. Add the class attribute with the value "required" to the elements represented by HTML tags INPUT, SELECT, and TEXTAREA, which must always be completed by website visitors. Note that, if an element already has the class attribute, the "required" part should be added to its current value separated by a whitespace character. Below is an example of the correctly added class attribute value to an element of a sign-up form:
    <input style="width:400" id="wbs-field7" name="C_EMAILADDRESS" type="text" class="email required" />
  4. In order to visually mark a required field as such, add the * character next to its caption/label; e.g., as shown in the picture below: