PHPRunner and ASPRunner.NET can validate required fields automatically. You can also make empty required fields more noticeable by highlighting them while the user is filling out the form.
In this example, an empty required field is highlighted in yellow. As soon as the user enters a value, the normal background is restored.
Open the field's Edit as settings and enable the Required field option.
The Required field option handles validation when the form is submitted. The JavaScript below adds a visual indication while the user is filling out the form.
Open the JavaScript OnLoad event for the Add or Edit page and add the following code:
Replace CompanyName with the name of your required field.
The function runs when the page loads and again whenever the field value changes. An empty field is highlighted immediately, and the highlight disappears when the user enters a value.
Build your project and open the Add or Edit page in the browser. Empty required fields will be highlighted until the user enters a value.
To apply the same behavior to several fields, list their field names in an array:
Replace the example field names with the required fields from your own table.
You can change the background color or add other CSS styles if you want required fields to stand out differently. For example: