In my Drupal8 website I have a webform and I have developed a custom submit handler to submit the data to an external API, I can't use the remote post handler because I have to check the data before submit. So now if any error I got from the API as response I want to show the error message on the top of the form without reloading the page. How can I do this?

put on hold as unclear what you're asking by leymannx, Kevin, Pierre.Vriens, mradcliffe, sanzante 2 days ago

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.