I have a page which enables a teacher to book a lesson for a group of pupils. The teacher needs to say how many pupils will be in the group and what their names/emails are. It could be one; it could be ten.
I’d like to have a page with a drop down on it containing numbers, say one to ten.
Let’s say the teacher selects the number four.
I’d like exactly four identical, small forms to appear on the page underneath each other with, say, two fields: Name and Email in each.
I will need to retrieve all form fields from POST in a PHP controller whatever number the user chooses / however many forms are available.
Can anyone help with this? I have posted to the PHP forum already but responses are sending me this way for a JS solution. My JS is abismal.