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

[feature request] Allow manipulation of data between the form and submission #60

Open
keithradford opened this issue Oct 13, 2023 · 0 comments

Comments

@keithradford
Copy link

keithradford commented Oct 13, 2023

You can currently pass a data object into useForm which allows you to merge additional data from outside the form into the submission.

It would be nice if, similarly to this, we could pass callback functions which perform operations on data from our form before submission.

For example, if I have a dropdown for selecting a state:

  • user selects Washington
  • user submits form
  • callback converts Washington into WA
  • WA is sent to Formspree

This could be a new attribute of the options PR, or potentially could be inferred from the existing data attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant