Files
plugi/extensions/plugi-ext-form/routes/submit.php
T
deepDiverPaul c507618b90 add form submission handling and confirmation emails
Validate form submissions and action configuration, execute finishers with submission context, and return JSON success or error responses. Add configurable confirmation emails to submitters and report failed submissions in the form UI.

Harden database and admin email finishers, and add submission handler and confirmation email checks.
2026-11-24 11:26:37 +01:00

11 lines
344 B
PHP

<?php
$handler = new \Plugi\Extensions\Form\SubmissionHandler();
$result = $handler->handle($_GET['id'] ?? null, file_get_contents('php://input') ?: '');
http_response_code($result['status']);
header('Content-Type: application/json; charset=utf-8');
echo json_encode($result['body'], JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE);