Every JS-model form needs the result callback: put data-submit-result-callback="formResult" on the .coredna-js-form container and define window.formResult in the site's script. The platform calls it with the response first, for every answer including a 207, a 422 or a 500, and does nothing more when it returns false, so the callback shows the messages, keeps the answers and gives the buttons back.
Answer
API requests
Showing an error when a JS-model submission is rejected
The callback is in Add the platform's form scripts to a form layout, and with the jump back to an earlier step in Validation.
More in API requests
- A conditional field never appears, or never hides
- My properties fields come back as "Error: Getter for property … not found", or glued together
- "414 Request-URI Too Long", or my long properties selector stops working
- The selector in my GET body was ignored, and the full record came back
- My filter returned every record
Was this page helpful?
Your answer goes to the docs team.