Configuring Required Web Form Fields

Print Friendly and PDF Follow

The default Ares web pages have some form fields that are marked by default as "required." When viewing the pages on the web, these required web form fields are flagged with a red * (asterisk). The message, *Indicates required field appears in the upper right corner of the form to let users know they cannot leave those fields blank. Any field can be designated "required" and fields that are currently set as "required" can be set to a not-required status. 

Removing or adding the asterisk is an important step to let your users know which fields are required but does not serve to let Ares know that the fields are required. Fields must be configured in the WebValidation table for Ares to consider them required. When a user fills out a page on the Ares web interface and clicks the Submit button, Ares checks the WebValidation table and returns error messages for the required fields that were not filled in.

The WebValidation Table

The WebValidation table, accessible in the Ares Customization Manager under Web | Validation, stores the fields that you require your users to populate. The WebValidation table consists of the following fields:

FormName

This is the name of the web page containing the field name. The name of a web page is taken from the form action section of the form's HTML code and is not necessarily the physical file name.

FieldName

The name of the field using web validation. Taken from the "name" value in the HTML code.

ValidationType

  • Required is the most commonly used value. This just requires something to be entered in the field.
  • RegEx tells Ares that in addition to being required, the validation should use the regular expression placed in the Validation field.
  • NotEqual can be used to not allow a certain value (placed in the Validation field).
  • ConditionalBooleanYes is used on fields that are "Yes/No" questions. If the answer is "Yes", another field becomes required. The field to be required is specified in the Validation field.
  • System is used to make a field required if another field had an appropriate value. A common example is if the Supply option for "this item links to a website" is chosen, then the URL field should be made required. There are only certain combinations of fields where "System" will work. Contact Ares support for further information.

Validation

The qualifier value that is used in conjunction with the method chosen in the ValidationType field. This could be the regular expression you want to force a certain syntax for the entered value. It could also be the name of the field that becomes required if you had "ConditionalBooleanYes" in the ValidationType field. See above for other options. This field is optional.

Error

This holds the message that you want to appear on the web page if the field is not filled out properly. The message will appear at the location of the ErrorTag in the HTML. The appropriate tag is listed in the ErrorTag field. This field is optional.

Summary

The message that will appear in the banner at the top of the page if the field is blank or not filled out properly. Field is optional but recommended.

ErrorTag

The HTML tag associated with the field. This will be replaced by the message in the Error field if the field is left blank or not filled in properly.

Making Fields Required or Not Required

If you want to make a field required or not required, you must add the field value to the WebValidation table or edit the value already in the table. Most fields in the WebValidation table have a ValidationType of Required, meaning that any character (including a space) is valid in that field, but that the field requires at least one character be entered or it will return an error message. If you want to make a field not required, you should delete the entry from the WebValidation table, making sure to also edit the web page to remove the required asterisk from the field. If you are adding a validation to a field you would need to add the field to the WebValidation table and place the asterisk on the text in the HTML form so users know it is a required field.

Changing the Validation Value

To add a new validation rule or to change the existing validation rule in the field's Validation column:

  1. Click on the row for the field you want to change to open the edit form.
  2. Change value in the Validation field to the new rule.
  3. Click the Save button to save your changes and close the edit form.

Deleting a Required Field

If you want to eliminate an existing required field, you can delete it from the WebValidation table.

  1. Choose the row for the field you wish to eliminate by clicking on that row and clicking the Delete editing option.
  2. A confirmation popup asks if you are sure you want to delete the record and warns that the action cannot be undone.
  3. Click the Yes button to delete the field from the table.

Removing the Asterisk from the Web Form

No matter which of the two methods you use to change a required field value, you will need to edit the web page to remove the asterisk from the field. Open the web page containing the field you are changing and remove or hide the "required" span class for that field using the following format:

<!-- <span class="req">*</span> -->

Questions?

If this article didn’t resolve your issue, please contact Atlas Support for assistance:

Contact Support