Order forms
The script finds your order form on its own. You only need to mark the cases it cannot recognise.
On this page
How the script finds the form#
A form counts as an order form when it has a phone field and a name or address field. The script reads each field’s type, autocomplete, name, id, placeholder and aria-label, in Arabic, French and English.
What the script adds#
The script adds a hidden field named antiro_token to the form, and keeps the same value in the cookie _atr_st. This value is the order reference. Your server receives it with the order and forwards it as session_token.
Mark a form the script does not recognise#
Add data-antiro-order to the form.
<form data-antiro-order action="/order" method="post">
<input name="contact" required>
<button>Order</button>
</form> Mark a button that does not submit a form#
A submit button inside the order form is checked automatically. If another element places the order with JavaScript, mark it with data-antiro-submit.
<div class="buy-now" data-antiro-submit>Order</div> Give other buttons a type#
The browser treats a <button> without a type as a submit button, so a click on it is checked like an order. Give quantity and coupon buttons type="button".
<form action="/order" method="post">
<input name="phone" type="tel">
<input name="name">
<!-- not an order: never checked -->
<button type="button">+1</button>
<button>Order</button>
</form>