Skip to content
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

Add setting in ufForm to specify which fields are sent with form submission #834

Open
alexweissman opened this issue Dec 22, 2017 · 0 comments
Labels
core feature request Feature request frontend The frontend interface
Milestone

Comments

@alexweissman
Copy link
Member

alexweissman commented Dec 22, 2017

This could be useful for example with fields like credit-card numbers, which need to be submitted to a third-party service (like Stripe), but should not be submitted to your own server for security and compliance purposes.

Right now ufForm submits any form fields of class :input in both the _urlencodeData and _multipartData methods. Instead, we could allow a jQuery selector string, or even a callback, to be passed as a setting to ufForm with :input as the default. This would allow you to prevent certain fields from being submitted with .not or :not.

This would also be a good opportunity to refactor _urlencodeData and _multipartData to make them a little DRYer.

For the time being, a workaround is simply to disable fields like these in the beforeSubmitCallback, but that changes the UI and is not necessarily the most desirable solution.

It's also worth noting that jqueryvalidation has an ignore setting, but this only affects whether fields are validated, as opposed to whether they are submitted. You might want to validate a credit card number client-side, but not actually submit it with the form to your server.

@alexweissman alexweissman added core feature request Feature request frontend The frontend interface labels Dec 22, 2017
@alexweissman alexweissman added this to the 4.2.0 milestone Dec 22, 2017
@lcharette lcharette modified the milestones: 4.2.0, 4.3.0 Oct 13, 2018
@lcharette lcharette modified the milestones: 4.3.0, 4.4.0 Oct 20, 2018
@lcharette lcharette modified the milestones: 4.4.0, 4.5.0 Nov 23, 2019
@lcharette lcharette modified the milestones: 4.x.x, No Milestone, 6.0.0 Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core feature request Feature request frontend The frontend interface
Projects
Status: References
Development

No branches or pull requests

2 participants