Tripetto WordPress plugin API
This API reference covers the available hooks and filters for the Tripetto WordPress plugin.
✨ Installation
You can download the free version of the Tripetto WordPress plugin.
📥 Download the Tripetto WordPress plugin
👩💻 Example
Here is a basic example of the tripetto_submit hook that is invoked when a form is completed:
add_action("tripetto_submit", function($data, $form) {
// Let's send an email whenever a form is submitted
$subject = "New form submission for " . $form->name;
$message = $subject . "\n\n";
// Add all the collected fields to the message
foreach ($data->fields as $field) {
$message .= $field->name . ": " . $field->string . "\n";
}
// And send it!
mail("example@domain", $subject, $message);
}, 10, 2);