Kirby Uniform post to external URL

How can i get Kirby Uniform to validate a form that posts to an external url rather than the same page? I have an external URL in the action attribute in the form tag, but Uniform isn’t validating it as a result, it just goes straight through. I dont think i can use a webhook in this case.

Then you have to set the action attribute to your form handler, then send the validated data to the external URL.

What’s your use case? You could also do client side validation.

I need to send the form data to Zoho forms, since my client wants the data to go into a CRM directly, which they say should be just like this…

<form action='ZOHOURL' name='form' id='form' method='POST' accept-charset='UTF-8' enctype='multipart/form-data'>

But i dont really have time mess about with custom validation of client side stuff. I think i can lean on webhook part of uniform anyway since it just leans on cUrl to send it…its just a question setting it right i think… turn off json and set the encoding to multipart/form-data… do you think that would work?

Yes, that should work. Does the web hook send JSON by default? Then you probably have to adapt the header.

Yes but you can turn it off and it uses application/x-www-form-urlencoded instead… i guess thats fine… im not really en expert on how form submissions work techincally.

Yep that works a treat. The form had some hidden fields in it that didn’t get sent but i was able to send them via the data param in the webhook action.

Good to know that you can in fact use the webhook action to send to external processor, and get uniform to validate it, even if its not actually a webhook at the other end.