submit button will do 2 things |
(10-18-2019, 12:00 AM)ceta Wrote: this project is on 2.1.2 version A simple way to do it is by sending the form through ajax, so you can send both requests without problem. The following jQuery plugin makes it very easy to send with ajax: https://jquery-form.github.io/form/ You could for example insert the first group of data using the submit form and if the registration is done correctly then make the second request to insert the data using the callback: Code: <script> A second variant could be to send the form without ajax, that is to say "in a normal way" and then in the action of the controller that handles the request make the second request using some tool like Guzzle for example: https://github.com/guzzle/guzzle PHP Code: $response = $client->request('POST', 'http://httpbin.org/post', [ |
Messages In This Thread |
submit button will do 2 things - by ceta - 10-18-2019, 12:00 AM
RE: submit button will do 2 things - by ceta - 10-18-2019, 12:39 AM
RE: submit button will do 2 things - by InsiteFX - 10-18-2019, 03:09 AM
RE: submit button will do 2 things - by fernaog - 10-18-2019, 06:16 PM
|