-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide more options for how submitted form data is processed #321
Comments
We (aka Thomas) already build a solution for this. With some cleanup and extension: I think after this it would be ready for a RC version and a pull request. |
We've added a new tab to define a JSON API endpoint and the possibility to define which kind of security (e.g. Basic Auth) is used. The expected behavior sounds very good to me, but it would be nice to have at least two possible security types (Basic Auth and Bearer Token) for the API type. |
I think at the end the result should be you can define endpoints which will be then used where the data should be send to: sulu_form:
endpoints:
my_endpoint:
title: 'app.my_endpoint'
method: 'PUT';
uri: 'https://example.org';
headers:
Authorization: 'Bearer Test';
my_other_endpoint:
title: 'app.my_other_endpoint'
method: 'POST';
uri: 'https://user:[email protected]'; The content manager itself should just have then an option via a Multi Checkbox or Multi Select which endpoints are activated for that form and the data will then be send to that endpoints depending on the checkboxes or not. |
Is "you" the developer? That sounds good for many cases, but in our actual project it was a requirement that the content manager is able to select and define the authorization type of the JSON API endpoint for each form. |
@thomasduenser I don't think that any Content Manager should get into contact with At the end the content manager should just need to choose I want that data is always send to mailchimp, to sending blue, to my crm, ... The configuration for authentication should in my point of view always be done by a developer not by some content managers. |
Hello @Quehnie @thomasduenser, did you get around submitting the PR at some point? We might be in need for this feature, and wanted to check beforehand if someone already went down that road. |
Actual Behavior
At the moment form data is always stored in the database and only some email configuration can be done to decide what should happen if someone fills out the form.
Expected Behavior
A more flexibel way to define how submitted forms are processed would be nice. A possible solution could be that the whole email configuration is removed from the "General" tab and a new tab is added instead. The new tab should include the possibility to add as many "form processing" mechanisms as the user wants. The following types should be provided:
It would be cool if it is really easy for a developer to add new types to use e.g. the API type in a flexible way (e.g. add a new "API with Basic Auth" type or a new API type that processes the form data before posting them to the given URL).
@thomasduenser & @Quehnie: Please add your thoughts and requirements.
The text was updated successfully, but these errors were encountered: