Im trying to send from a Uniform powered form to ZOHO Forms rather then using their horrendous embeddable stuff (very code heavy and very ugly!). I think i can do it via webhook similar to the Mailchimp example in the Uniform Docs. Anyone done this with ZOHO Forms, and can point me in the right direction?
I think this page in the ZOHO docs tells me what I need to know, but I don’t quite know how to tie this information in to a Uniform Form.
Anyone know?
Im getting somewhere, but i cant seem to get Uniform to tell me anything.
When use the action=""
on the form with the api url, it works but it also downloads the json response.
I tried this in my controller:
if (r::is('POST')) {
$contactform->webhookAction([
'url' => 'https://creator.zoho.com/api/name/json/website-contact-form/form/Leads/record/add',
'json' => true,
'params' => [
'method' => 'POST',
],
]);
if ($contactform->success()) {
go('/');
}
}
Which seems like it work, if i take the action off the form, but i dont get a record added to ZOHO like the other way does, but it does redirect to the home page afterwords, so i guess it was successful.
What am i doing wrong?
Finally!
Dont use json with it and it works…
$contactform->webhookAction([
'url' => 'https://creator.zoho.com/api/name/json/website-contact-form/form/Leads/record/add',
'json' => false,
'params' => [
'method' => 'POST',
],
]);