V
V
virek972018-03-11 20:45:49
PHP
virek97, 2018-03-11 20:45:49

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

2 answer(s)
C
coderisimo, 2018-03-11
@virek97

Here's a general idea for you:
jsfiddle.net/7yt2A
show/hide something based on form element values.

S
synapse_people, 2018-03-11
@synapse_people

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 question

Ask a Question

731 491 924 answers to any question