GithubHelp home page GithubHelp logo

Comments (3)

jherr avatar jherr commented on September 24, 2024 1

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.

waldothedeveloper avatar waldothedeveloper commented on September 24, 2024

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:

image image

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 and value={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.

jherr avatar jherr commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.