Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
j0n4s53107y@Kimmax But my inputs have the same name for each row and it overrides it everytime. So i just get the last row...
-
jonjoe807yDepends on how complex the forms are. Javascript in forms is great for:
- Curated User Journeys
- Multistage forms
- Intuitive Feedback (errors etc)
- Interactive form elements such as progress bars.
React a good tool for these kinds of forms.
If you don't need any of the above: HTML forms have some basic features like generic validators and HTML5 inputs that can get you a decent way. -
j0n4s53107yI have 4 inputs in each row and i want to be able to remove and add rows. But they all have the same names. So in the PHP Post array is just the last row.
-
jonjoe807yOk I think before you start adding interactive behaviour you need a good understanding of HTML5 forms.
https://developer.mozilla.org/en-US...
https://www.w3schools.com/Html/ -
j0n4s53107y@jonjoe Uhm i know html forms well i work very often with them and i know the problem but my Browser posts it like that and php receives it as "Array ( [event] => test2 [current] => test2 [need] => test2 [person] => test2 )"
-
segfaults117yUse square brackets in name example <input type='text' name='event[] ' /> then you'll get all values as separate arrays in post
Related Rants
Why do i need javascript to post html tables?
rant
table
post
but_why
html