Submit data via an API call ? #394
Replies: 8 comments
-
@just-alexis you can use Via If you want to know how the Submit handling works check the SuluFormBundle/Event/RequestListener.php Line 70 in 12d2df1
Not sure what you mean here. If you don't disable saving data it always saved to the database. If you configure notify email address, notify are alway send. So can have both saving to database and sending emails. Emails can be send to the notify (admin) email and to the website visitor (if email field exists). |
Beta Was this translation helpful? Give feedback.
-
An example of JS based submittion via Dropzone can also be found here in the docs: https://github.com/sulu/SuluFormBundle/blob/2.5/Resources/doc/dropzone.md#2-form-submit-handling-with-multiple-dropzones |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I understand correctly. With javascript, I need to intercept the form submit event, make an AJAX call to my external API, then let the default behavior continue ? That's right ? |
Beta Was this translation helpful? Give feedback.
-
Yes that is one way of doing it. The frontend is all in your control so you can to it the way you want it. Aslong as you send it in the format the Form Bundle expect it it doesnt care if its a normal submit or a ajax, curl or other call. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
FR is a none core language. You can download community translations like documented in the Sulu Getting Started Documentation via |
Beta Was this translation helpful? Give feedback.
-
Translations are done by the community here: https://sulu.crowdin.com/ |
Beta Was this translation helpful? Give feedback.
-
Actual Behavior
I don't know if I'm missing a configuration or something else.
But it seems that there are only 2 possibilities, either send an email or save the responses to the database.
Expected Behavior
I would like to make an API call and send the form elements with POST or GET.
Can I do a specific development to do this?
Beta Was this translation helpful? Give feedback.
All reactions