I am new to the Zurb Foundation concept and inherited some work to do. In a form I see the following
<div class="row">
<div class="small-12 column name-field">
<label class="show-for-medium-up">E-Mail-Adresse:*</label>
<input type="text" id="emailAddress" name="emailAddress" value="${requestParameters.emailAddress!}" placeholder="" required pattern="email" />
<small class="error"><i class="fi-alert"></i>Please provide your email address.</small>
</div>
</div>
<div class="row">
<div class="small-12 column name-field">
<label class="show-for-medium-up">Repeat email address*</label>
<input type="text" name="emailAddressConfirmation" value="${requestParameters.emailAddressConfirmation!}" placeholder="" pattern="email" data-equalto="emailAddress"/>
<small class="error"><i class="fi-alert"></i>The email address don't match</small>
</div>
</div>
I understand how this works.
But now I have to add additional functionality that when the two email addresses match the email address must be checked for existence in the database of the app and if it does it should show the next row - label, field and the message (alert), with following code:
<div class="row">
<div class="small-12 column name-field">
<label>Id code:</label>
<input type="text" name="idCode" value="${requestParameters.idCode!}" placeholder="" required/>
<small class="error"><i class="fi-alert"></i>This email address already exists. Please provide your ID code.</small>
</div>
</div>
The question is: how do I make this happen?
Regards, and thanks in advance