Buy Now
Sign in

How to repeat input area based on dropdown input

vestainsurance , September 13 2021, 06:53
V
vestainsurance 2
September 13 2021, 06:53 #397071
Hi, 

My form ask to user how many employees do he have (dropdown with number 1 - 50) and based on his choose I have to ask name, last name for every employee.

for example if I select 6 employees on dropdown input then I get the input text for:

name #1
last name#1

name #2
last name#2

name #3
last name#3

name #4
last name#4

name #5
last name#5

name #6
last name#6

There is a way to do this on chronoform7? 
The repeater area do this but only one at times and did not have a stop when the user have complete the employees, ie. I can add more ore even less employee.

thx
GreyHead 65
September 13 2021, 08:11 #397072
Hi vestainsurance,
Personally I would do this with a multi-page form. Ask the number of employees on one page, then show the list of inputs on the next one (or maybe even on several pages in blocks of 10).
I guess you could do it on a single page using JavaScript to add/hide the input rows.
Bob
If you'd like to buy me a coffee or two, thank you very much
V
vestainsurance 2
September 14 2021, 10:18 #397077
Hi Bob,
I have manage it, unfortunately I think now I have put too many fields and when I try to open the form via backend to edit I get error 500 or the page will be half load ( I see only text).

There is a way to load the page in this case or I should delete it and make a new form?
thx
GreyHead 65
September 16 2021, 09:55 #397087
Hi vestainsurance,
Are you running PHP 7.4? Someone else reported a similar problem today and said that they solved it by reverting to PHP 7.3 for editing their large forms.
Bob
If you'd like to buy me a coffee or two, thank you very much