Minimum website form
The Send2CRM client requires only a bare minimum to automatically hook into an HTML form and send submissions. The sample form below meets these requirements.
A unique means of identifying the submission.
Either theid
(“example_form“) oraction
(“/thankyou“) attributes may be used. Theid
is preferable and should be unique across all forms.A flag to indicate which
<form>
elements to handle.
The CSS classsend2crm-form
indicates to the Send2CRM client that it should process this form.Names on the
<input>
elements.
All fields have aname
attribute. As with standard form processing, this identifies the fields and allows reliable mapping.
<form method="post" class="send2crm-form" id="example_form" action="/thankyou">
<label for="firstName">First name</label>
<input type="text" name="firstName" />
<label for="lastName">Last name</label>
<input type="text" name="lastName" required />
<label for="email">Email</label>
<input type="email" name="email" required />
<label for="company">Company</label>
<input type="text" name="company" required />
<button type="submit">Submit</button>
</form>
Â
If the Send2CRM form submission succeeds standard form submission will continue, in this case POSTing to the /thankyou page. If it fails a validation error will be shown on the form.