Connecting your script

Connect your script, which will receive responses from the form, in the block settings. Open the settings, double click Receiving Data From Forms, a selection screen will appear.

Data is delivered via POST. Variable field names can be modified in the block settings. Data can also be sent without reloading the page (Ajax).
Sample script that sends responses to your email
Add this script to the server, specify the script URL in Webhook settings. Any responses received via Webhook will be sent to your email.
<?

$headers = "From: from@webhookservesite.ru";
​
 $message = print_r($_POST,true);
 @mail('to@mail.ru', 'Tilda TEST', $message, $headers);

echo"ok";

?>
Data receivers work only with an active subscription. If you are exporting your website, hosting it on your own server or cancelling your subscription, you need to connect your own script.
If you connect your script using the method described in this page, the forms will remain active even if the subscription is inactive.
How to display successful or unsuccessful data submission message in the script
If you are adding your script to the from and choosing the Ajax contact form script, the forms will process the following types of responses:
  • {"message":"OK"} - data submission successful;
  • {"message":"Thank you for your submission"} - a custom message about successful data submission;
  • {"error":"This field … contains an error"} - a custom error message.
Alternatively, choose to send back the submitted response or the HTML.
Made on
Tilda