I have a form which can be dynamically expanded with additional email-fields. I do this with Javascript (appendchild). That works fine.
The sole problem is that the form validation don't work completely with the attached fields.
Static field (works):
Code: Select all
<div class="reihe" id="reihe_0">
<label for="email_0">
<span class="label"><?php echo JText::_( 'RECIPIENT_EMAIL' ); ?></span>
</label>
<span class="feld"><input type="text" class="defbreite required validate-email" maxlength="100" name="email_0" id="email_0" value='' size="30" /></span>
</div>
The Code which is dynamically created with Javascript looks like this:
Code: Select all
<div class="reihe" id="reihe_1">
<label id="label_1" for="email_1">
<span id="span_2" class="label">Empfänger 2:</span>
</label>
<span id="span2_1" class="feld"><input type="text" name="email_1" id="email_1" class="defbreite required validate-email" size="30" maxlength="100"/></span>
</div>
If I insert the created code directly into the php-file the code is working.
Any idea for me how to get it working?
Thanks very much
Papi