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 support for form submissions #780

Merged
merged 28 commits into from
Jun 16, 2020
Merged

Add support for form submissions #780

merged 28 commits into from
Jun 16, 2020

Conversation

RaeesBhatti
Copy link
Contributor

@RaeesBhatti RaeesBhatti commented Mar 31, 2020

- Summary
Add support for form submissions.
Fixes: #447

- Test plan

  • Run netlify dev
  • Make a POST request with url encoded data

- Description for the changelog
Transform the body of POST requests with Form data to match a submission-created event in Production.

- A picture of a cute animal (not mandatory but encouraged)
🐰

src/commands/dev/index.js Outdated Show resolved Hide resolved
src/utils/forms.js Outdated Show resolved Hide resolved
src/commands/dev/index.js Outdated Show resolved Hide resolved
src/commands/dev/index.js Outdated Show resolved Hide resolved
@erquhart
Copy link
Contributor

@fool correct if I'm wrong but you weren't looking for actual submissions here, just a successful response and trigger the form submission triggered function if it exists. The form submission itself would not be retained. Sound about right?

@fool
Copy link
Contributor

fool commented Apr 1, 2020

yes, that was indeed my thinking, @erquhart

@RaeesBhatti
Copy link
Contributor Author

@fool Do you have any advice on where to look for sample submission-created event payload? I need the event shape to emulate that in netlify dev.

@fool
Copy link
Contributor

fool commented Apr 1, 2020

I don't have good examples of the payloads, aside from what is in the public doc:

https://docs.netlify.com/functions/trigger-on-events/#payload

@fool
Copy link
Contributor

fool commented Apr 1, 2020

Would be good to get a "dump the input" function example spun up. I bet @depadiernos could write one in about 5 minutes, but it's not something I can just toss out since I'm no javascript pro

@RaeesBhatti RaeesBhatti added the type: feature code contributing to the implementation of a feature and/or user facing functionality label May 17, 2020
@RaeesBhatti RaeesBhatti marked this pull request as draft June 8, 2020 16:04
@RaeesBhatti RaeesBhatti marked this pull request as ready for review June 15, 2020 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for forms
4 participants