https://formsapi.webart.co.il/api
Your API url:
Enter your email address in the form below and click the Submit button to generate your email ID.
Specify a custom email subject. If omitted, the default subject (set in the configuration file) will be used.
<input type="hidden" name="_subject" value="My awesome subject">
Specify a custom reply to email address for the email.
<input type="hidden" name="_replyto" value="johndoe@gmail.com">
Instead of specifying a static custom "reply to" address, you can also choose to use an email address entered by the user of the form. In order to do this, give your custom "replyto_" field a value of "%" followed by the name of the field. Let's assume you have a field named "email" which value you'd like to use for your custom "reply to" field, then you'd give you "reply to" field a value of "%email".
<input type="hidden" name="_replyto" value="%email">
Specify one or more CC recipients for the email.
<input type="hidden" name="cc[]" value="johndoe@gmail.com">
<input type="hidden" name="cc[]" value="janedoe@gmail.com">
Use the above syntax to specify one or more CC recipients. Please note the name of this field is "cc[]". This allows you to specify any number of entries, rather then just one.
Specify one or more BCC recipients for the email.
<input type="hidden" name="bcc[]" value="johndoe@gmail.com">
<input type="hidden" name="bcc[]" value="janedoe@gmail.com">
Use the above syntax to specify one or more BCC recipients. Please note the name of this field is "bcc[]". This allows you to specify any number of entries, rather then just one.
Specify a URL to redirect the user to after successfully submitting the form.
<input type="hidden" name="_after" value="http://google.com">
This is a special field which acts as a form of SPAM protection. This hidden field will not be shown to regular visitors, but most SPAM bots will automatically enter a value into this field. If Sent API detects a value, the data is considered SPAM and won't be processed (no email will get send).
<input type="text" name="_honey" value="" style="display:none">
Sent API handles form files with a breeze. Simply add the following element to your form and API will attach the file the email it sends out:
<input type="file" name="file">
Set a custom confirmation message shown to the user after successfully submitting the form:
<input type="hidden" name="_confirmation" value="<b>Thank you!</b> We have received your message and will get back to you asap.">
Sent API lets you set validation rules on the submitted data. The syntax is simple, just add a hidden input field to your form, and set the name attribute to name="_valid[field_name]"
where you woud replace "field_name" with the name of the field for which you are defining a rule. If you were to have a field named "email", then you name your validation field name="_valid[email]"
.
The value attribute of your validation field should contain one or more validation rules. When specifying multiple rules for a single field, the rules should be separated by a "|" as such name="rule_one|rule_two|rule_three"
.
Below you'll a listing of all available validation rules:
Rule | Description | Example |
---|---|---|
required | Returns FALSE if the form element is empty. | |
min_length | Returns FALSE if the form element is shorter then the parameter value. | min_length[6] |
max_length | Returns FALSE if the form element is longer then the parameter value. | max_length[12] |
exact_length | Returns FALSE if the form element is not exactly the parameter value. | exact_length[8] |
greater_than | Returns FALSE if the form element is less than the parameter value or not numeric. | greater_than[8] |
less_than | Returns FALSE if the form element is greater than the parameter value or not numeric. | less_than[8] |
alpha | Returns FALSE if the form element contains anything other than alphabetical characters. | |
alpha_numeric | Returns FALSE if the form element contains anything other than alpha-numeric characters. | |
alpha_dash | Returns FALSE if the form element contains anything other than alpha-numeric characters, underscores or dashes. | |
numeric | Returns FALSE if the form element contains anything other than numeric characters. | |
integer | Returns FALSE if the form element contains anything other than an integer. | |
is_natural | Returns FALSE if the form element contains anything other than a natural number: 0, 1, 2, 3, etc. | |
is_natural_no_zero | Returns FALSE if the form element contains anything other than a natural number, but not zero: 1, 2, 3, etc. | |
valid_email | Returns FALSE if the form element does not contain a valid email address. | |
valid_emails | Returns FALSE if any value provided in a comma separated list is not a valid email. | |
valid_ip | Returns FALSE if the supplied IP is not valid. Accepts an optional parameter of "IPv4" or "IPv6" to specify an IP format. |