Hello List,

I hope this is the right place for my question.

I have a working form and all iss great using this jQuery Form
Validation PlugIn from brassistance.
Now I got in trouble by having a Form which will get extended by user
inputs. To explan in detail:

I have a Form with static fields and so on. But then if the User
selects in the form the amount of Persons, I append Name and Surename
Text Fileds to the static form and give the form fileds dynamically
generated names.

I now have the problem to validate the dynamically generated text
fields in that form!

EXAMPLE:

<form name="test">

/* static fields*/
<label>Name</label><input type="text" name="name" value="" />

<label>Persons</label><br />
<select name="amount">
   <option value="2">one person</option>
   <option value="3">one person</option>
   <option value="4">one person</option>
</select>

<div style="display: none;" id="dynamount">
   <label>Name 2</label><input type="text" name="name_2" value="" />
   <label>Name 3</label><input type="text" name="name_3" value="" />
   <label>Name 4</label><input type="text" name="name_4" value="" />
</div>
</form>

So if a user fills out my form, the javascript adds a new row in the
div with the ID="dynamount" for each person. He looks for change the
select field and putts a row for each person bigger than 1, because
the first name is given at the top of this form. And I need to know
how I can validate the dynamically generated input fileds.

Any Helping Ideas?

Best Regards,
Marcel

Reply via email to