I will create a select and would like it to update the amount of records

Asked

Viewed 38 times

-2

I am creating a system and in the part of registering products in php a select with the option of how many products will be registered, I would like q when choosing the select updated to appear the number of lines for registering, how can I proceed????

Gratitude =D

1 answer

0


The best way is to create the fields dynamically through javascript. When the user selects the number of products that will be registered, you trigger the event that will create the fields:

https://jsfiddle.net/caiubyfreitas/9cezx9wr/

Note that the fields will be nested in the DIV identified by "container":

var container = document.getElementById("container")

Browser other questions tagged

You are not signed in. Login or sign up in order to post.