First form is embed form from external website (vTiger webform) with action="https://***/crm/modules/Webforms/capture.php" method="post"
Second form is FormIt-based form with preHook, which generate “form name”, “user_id” and “form_id” (value from TV). I save data from this form in another column is SQL-db. This form has action="[[~[[*id]]]]"
If i click send-button one them then work (send data) only 1 form.
I’ve tried via JavaScript and jQuery but work only 1 form:
Hi halftrainedharry,
Do you have any sample of code with curl for this hook, please?
I don’t have any idea how to do it. I know how to download something via curl or create any API-connection vi curl but no idea how to use it in the hook.
Hi Bob,
I don’t understand what do you mean. It can’t be one form because first form send data to external website, second form is form with FormIt2db-hook.
I understood you to mean you wanted both forms to always be submitted together. If that’s the case, There’s no reason a single form can’t both write to the DB and send data to an external website.
Either one would work, but Ajax would require a custom processor. I think I’d do it all in PHP with cURL. You could use the remote_key (string) field of the user object to record whether they’ve sent the form.