Description
A highly used feature in ACF is our PHP validation powered via AJAX. This allows developers to highly customize the validation process via PHP whist providing convenient feedback to the user when a field value does not meet its requirements.
To do this, we use JS to intercept the "submit" action on the form and stop it. We then send all $_POST data via an AJAX request and use the returned JSON to either display errors or re-submit the form.
It is important for UX that we validate the form data only when the user clicks the "publish" button.
Issues
Questions
Description
A highly used feature in ACF is our PHP validation powered via AJAX. This allows developers to highly customize the validation process via PHP whist providing convenient feedback to the user when a field value does not meet its requirements.
To do this, we use JS to intercept the "submit" action on the form and stop it. We then send all
$_POSTdata via an AJAX request and use the returned JSON to either display errors or re-submit the form.It is important for UX that we validate the form data only when the user clicks the "publish" button.
Issues
Questions