Comments (3)
This is intentional. The code in the repo is a corrected version of the code in the video. There was an issue with navigation before form submission that is fixed by this update.
from forms-management.
This is intentional. The code in the repo is a corrected version of the code in the video. There was an issue with navigation before form submission that is fixed by this update.
Thank you Jack for the quick response! I later on saw the navigation error you mentioned in your response and then understood your answer even better and modified the code.
Building on this great tutorial you put together, I wanted to ask you how do you handle more complex forms where you have for example Files that need to be uploaded - and validated lol - , but you need to show a 'grid' of the 'uploaded' files.
Look at this Listing Form from Etsy:
The approach I think it could work is
- Using React State to hold an array of selected images from your computer
- Using this React State to build the grid of images
- Using a hidden input maybe
readOnly
andvalue={JSON.stringify([arrayOfPictures])}
that can be used to submit the array of pictures for validation in server side????? - Can you send a File to a server action using FormData? Or does it need to be converted to some other format?
With more complex forms like this example is where my vision starts getting blurry. Anyway, I'd love to hear your input on a situation like this, how would you proceed, would you leverage React state combined with hidden inputs to submit the data for validation server side, etc.
Again, thank you so much for the amazing tutorial!
from forms-management.
Feel free to jump on the Blue Collar Coder server https://discord.gg/YSnJBu8H and ask your question in the #react forum there. Please read and follow the #rules CAREFULLY before posting.
from forms-management.
Related Issues (4)
- Code typo on async validation lesson HOT 2
- Error: Manual Form Submit HOT 5
- file input form? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forms-management.