K
K
Kir Shatrov2010-09-11 18:28:23
JavaScript
Kir Shatrov, 2010-09-11 18:28:23

Nested forms, dynamic elements?

There is a form, several elements are nested in it - for example, the founders that need to be added there (the number is unlimited). I used to make a “one more founder” button, by clicking which more fields were added, Now the form is more complicated, and a beautiful solution is needed . Technologies - PHP/jQuery.

Example.

The structure is like this:

поле 1<br/>
поле 2<br/>
<br/>
учредители:<br/>
 учредитель 1: фио1, место регистрации, поле 3, поле 4<br/>
 учредитель 2: фио2, место регистрации, поле 3, поле 4<br/>
 -добавить учредителя (кнопка добавляет еще инпутов)<br/>
поле 3<br/>
поле 4<br/>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
max_rip, 2010-09-11
@max_rip

mm, it's best to hide the template in the code, and duplicate it, and count the N founders yourself).

B
bigdogsru, 2010-09-11
@bigdogsru

On the change event on one of the inputs, check everything - if something is entered in all, then add an empty field?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question