When you set up a form in your dashboard, you can add as many fields as you want.
Beyond usual options such as name, label and optional status, it is possible to define a field identifier.
By setting a unique identifier, the values of the fields are retrievable inside an onFormSubmit event listener.
To go further in your form customization, Poool provides a webhook to set up your own fields processing logic and to manage custom errors in the paywall.
As specified in the introduction section, you must first configure your own endpoint.
Here is the list of information sent by Poool:
You are now able to set up your own logic. To display errors inside your form, simply return a JSON payload.
ℹ️ Warning, fieldKeys associated to this error management are the variables of the fields. Here is an example:
ℹ️ Be careful when configuring your endpoint. If you return a payload containing fieldKeys used in your form, it will be impossible to unlock the article.