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

Update the build forms recipe to use actions instead. #10374

Open
Abdo-reda opened this issue Dec 15, 2024 · 2 comments
Open

Update the build forms recipe to use actions instead. #10374

Abdo-reda opened this issue Dec 15, 2024 · 2 comments
Labels
help wanted Issues looking for someone to run with them! improve documentation Enhance existing documentation (e.g. add an example, improve description)

Comments

@Abdo-reda
Copy link

📚 Subject area/topic

HTML forms, and Actions

📋 Page(s) affected (or suggested, for new content)

https://docs.astro.build/en/recipes/build-forms/

📋 Description of content that is out-of-date or incorrect

This recipe uses standard handling of html. A section should be included to use actions instead because that's the updated way and a more cleaner way of handling forms in astro.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

@Abdo-reda Abdo-reda added the improve documentation Enhance existing documentation (e.g. add an example, improve description) label Dec 15, 2024
@sarah11918
Copy link
Member

Hi! I think we would welcome an update to have a recipe building forms with Actions!

Since there may be people who, for whatever reason, might prefer not to use actions, perhaps we can update this recipe to show the exact same thing using actions, and also keep the original at the bottom as an alternative. (Also, we need to update the prerequisite for how server-rendering is now handled!)

Maybe something like:

# Build HTML forms in Astro Pages

With a server adapter, Astro pages can both display and handle forms. In this recipe, you’ll use Astro actions to submit form data to the server and check for errors.

<ReadMore>See how to use a standard HTML form without actions to submit data to the server. Your frontmatter script will handle the data on the server, sending no JavaScript to the client.</ReadMore>

Prerequisites
A project with [a server adapter](/en/guides/on-demand-rendering/#server-adapters) installed.

I will add help wanted on this issue for anyone who would like to update the recipe! 🙌

@sarah11918 sarah11918 added the help wanted Issues looking for someone to run with them! label Dec 16, 2024
@Abdo-reda
Copy link
Author

yes I completely agree, including both approaches would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues looking for someone to run with them! improve documentation Enhance existing documentation (e.g. add an example, improve description)
Projects
None yet
Development

No branches or pull requests

2 participants