Answer the question
In order to leave comments, you need to log in
How to make an application form?
There is the following task for editing the application form:
Add field: Participation format: with accommodation, without accommodation. If with accommodation, then two more fields open - the number of accompanying persons and the rate of accommodation for accompanying persons: accommodation with breakfast - 13600 (summer 2018) and accommodation with three meals a day - 21600 (summer 2018)
Question:
How to implement the logic of this task in general? I can’t even google properly, because I don’t know how to ask the right question. I would love to see a finished example.
Answer the question
In order to leave comments, you need to log in
Here's a general idea for you:
jsfiddle.net/7yt2A
show/hide something based on form element values.
make a normal select, add your options to it (with accommodation, without accommodation), with and without values, respectively.
then include jquery and do something like this:
put the other 2 text fields into the #subform element..
That's it!)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question