Ometria forms are HTML sign-up forms that you add to your website, for example on a landing page or in your footer. Support builds the code for each form and sends it to you. The code contains visible fields that your visitors fill in, and hidden fields that tell Ometria what to do with each submission.
See also: Ometria forms, Setting up Ajax forms
Example form code
Your form code looks something like this. Support fills in the values for your form ID and your account.
<form action="https://api.ometria.com/forms/signup" method="post">
<input type="hidden" name="__form_id" value="YOUR FORM ID" />
<input type="hidden" name="email" value="" autocomplete="off" />
<div style="display:none !important">
<input name="__email" type="email" value="" autocomplete="off" />
</div>
<input name="@account" type="hidden" value="YOUR ACCOUNT HASH" />
<input name="@return_url" type="hidden" value="" />
<input name="@subscription_status" type="hidden" value="SUBSCRIBED" />
<input name="@add_to_lists" type="hidden" value="SEGMENT ID" />
<!-- Form elements go here: Style as you wish -->
<table>
<tr>
<th>Email address</th>
<td><input name="ue" type="text" value="" /></td>
</tr>
<tr>
<th>First name</th>
<td><input name="firstname" type="text" value="" /></td>
</tr>
</table>
<input type="submit" value="Submit form" name="submit" />
<!-- End of form elements -->
</form>
Hidden fields
Hidden fields don't appear on your page. Some of them you can edit, and some must stay exactly as Support sent them.
| Field | What it does | Can you change it? |
__form_id |
Identifies this form. Each form has its own settings in Ometria, for example how it handles subscription. | No. For a new campaign or a new purpose, ask Support for a new form instead of reusing old code. |
email (hidden) and __email
|
Part of Ometria's bot protection. Your visitors never see these two fields. | No. Keep both fields in the code, empty and hidden. If either field has a value or is visible, Ometria doesn't accept the submission. |
@account |
Identifies your Ometria account. | No. |
@return_url |
The page your visitor goes to after they submit the form, for example a thank you page. If you leave it empty, Ometria sends the visitor back to the page they came from, or to your homepage. | Yes. Enter an absolute URL, for example https://www.example.com/thank-you. You create this page yourself. |
@subscription_status |
Sets the contact's email subscription status. SUBSCRIBED subscribes the contact, even if they unsubscribed before. UNCHANGED leaves their status as it is. |
Yes. Automatic subscription isn't allowed in all regions. You can ask Support for an opt-in checkbox instead, or delete this field to leave subscription status as it is. |
@add_to_lists |
Adds the contact to a static segment when they submit the form. The value is the segment ID. | Yes. Enter the ID of your static segment, or delete the field if you don't need it. You can find the ID in the ID column of the Saved segments screen. |
Visible fields
Visible fields are the ones your visitors fill in. You can change their labels, layout and styling. Keep the field names exactly as they are in the code.
| Field | What it does | Can you change it? |
ue |
The contact's email address. This is the only mandatory field. | Keep the name ue. You can change type="text" to type="email" so the browser checks the email format. |
firstname, lastname
|
The contact's first name and last name. | Change the labels and styling only. |
phone_number |
The contact's mobile phone number. Ometria needs it in international format, with a + and the country code, for example +447123456789. |
Add validation so visitors enter the country code. To accept numbers without a country code, also send country_id with a two-letter ISO 3166-1 alpha-2 code, for example GB. Use phone_number, not properties.phone_number. |
properties.<field name> |
A custom field. For example, a hidden properties.signup_source field records which form the contact used. |
The custom field must exist in your Ometria account first. See Managing custom fields. |
Subscription and opt-in checkboxes
You can ask Support to add an email marketing opt-in checkbox and an SMS marketing opt-in checkbox to your form. If your form doesn't have these checkboxes, Ometria opts the contact in to email. It also opts them in to SMS if they enter a phone number in the correct format.
Your form's settings in Ometria also affect subscription. If contacts are subscribed when you don't expect it, contact Support to check the form.
See also: Using double opt-in with Ometria forms, Collecting phone numbers and SMS marketing preferences
Test your form
- Add the form to your page.
- Submit the form with your own email address. If the form has a phone field, use a real number in international format.
- Find your contact in Ometria and check that the details and subscription status are correct.
- Delete any test contacts afterwards so they don't receive your campaigns.
See also: Can I use a re-captcha in my forms?, Delete contacts from Ometria
Comments
0 comments
Please sign in to leave a comment.