How do I create required fields in my cgiemail form?
Print Email
Email this article
Close
Email this article
CloseYou are here: Home > Website Support > CGI Scripts
Should you wish to make fields required fields and automatically reject forms with empty/blank input fields, add the prefix ‘required-’ to the name of the input field in both the HTML form code and template.txt file.
Specify the custom error page for unsuccessful completion of input fields by adding the following line:
<input value="http://www.yourdomain.com/fail.htm" name="failure" type="hidden">
HTML form:
Company Name: <input name="required-companyname">
Template.txt file:
Company: [required-companyname]
Was this information helpful?
Yes NoThank you for your feedback
We are delighted to find that our article resolved your query.
Thank you for your feedback
We will resolve your query as soon as possible.
Please take a few moments to comment on your unresolved query. Simply tell us what your problem is. We guarantee that we'll get back to you within two hours (during office hours) in response to your query.
