Using NetSuite Custom Code for Intelligent Online Forms
Publishing NetSuite online forms is a powerful and simple way to capture information from your customers, vendors, employees, or any other entities. These forms provide a secure and efficient way for you to automate the process of gathering data and can be used for a host of initiatives including Online Surveys, Reviews, RSVP Forms, or Questionnaires to name a few. In some cases, additional functionality may be required to ensure that the data being submitted is accurate or meaningful. NetSuite custom code allows you to add your own business logic to the forms, thus making them more ‘intelligent’.
The example below shows that if a user selects a particular field option they get an alert and the submit button is disabled, not allowing them to submit the form until a valid value is provided. In other words, the custom code is performing field level validation to ensure that the data submitted is accurate and will be useful once captured into your NetSuite account. Custom code allows you to perform calculations, set field values, enable or disable fields and many other functions.
Click below images to enlarge.
Before: User selects dropdown field option
After: Pop-up alert is displayed and submit button is disabled