Creating Online HTML Form Templates
When you create an online form template, you determine how the fields are arranged, which fields to include, and the style of the page.
You must include the following elements in the HTML code:
-
<NLFORM> and </form> tags
-
<HTML> and </HTML> tags
-
<HEAD> and </HEAD> tags
-
tags for each field you want to include
-
a button your customers use to submit the form
Don't use multiple instances of the same NL tag in a custom template, for example (<nlfile>). This will result in an error when the user submits the form.
In the body of your template, use field tags to place the fields that appear on your form.
The following table includes all the standard field tags used in online HTML customer forms. These include all the default fields on the case record:
Field |
Tag |
---|---|
Company Name |
<NLCOMPANYNAME> |
Name |
<NLENTITYID> |
|
<NLEMAIL> |
Message |
<NLINCOMINGMESSAGE> |
Subject/Title |
<NLTITLE> |
Subsidiary |
<NLSUBSIDIARY> |
File Upload |
<NLFILE> |
Case Origin |
<NLORIGIN> |
Case Type |
<NLCATEGORY> |
Contact First Name |
<NLFIRSTNAME> |
Contact Last Name |
<NLLASTNAME> |
Contact Middle Name |
<NLMIDDLENAME> |
Phone Number |
<NLPHONE> |
Incident Date |
<NLSTARTDATE> |
Incident Time |
<NLSTARTTIME> |
Support Issue |
<NLISSUE> |
Support Item |
<NLITEM> |
To determine the tags to use for custom fields, go to Customization > Lists, Records, & Fields > Entity Fields (Administrator). Hover over the field you want to include in your template. At the bottom of the page, the web address for this page appears in your browser. At the end of the address is the field tag. For example, the tag may look like this:
<NLCUSTENTITY2>
When you create your online form, you can let NetSuite insert field names into your form, or you can add your own field names in the template.
Your form also needs a button for customers to submit it to your NetSuite account. The HTML code for this button is:
<input type="submit" value="Button Text">
You can substitute the button text by changing the value in your code. For example, to make the text say Submit Form, the code would be:
<input type="submit" value="Submit Form">
Below is a basic representation of an acceptable HTML form template with field labels in the HTML code:
<HTML>
<HEAD>
</HEAD>
<NLFORM>
<p>Please enter the name of your company: <NLCOMPANYNAME></p>
<p>Enter a contact email address: <NLEMAIL></p>
<p>Enter a title for the message: <NLTITLE></P>
<p>Enter your message here: <NLINCOMINGMESSAGE></p>
<p><input type="submit" value= "Submit Form"></p>
<p> Attach a file here: <NLFILE> </p>
</form>
</HTML>
You can include labels for each field in the HTML code in your template, or let NetSuite insert default labels. The example above uses labels in the HTML code to show customers what information to enter.