Hi,
I have several forms on the same page.
I generate the forms with a Migx Template, on one page.
I can submit each correct form, but when I want to display the "
validation_error_message" : it displays on all generated forms on that same page !
I tried
&placeholderPrefix=`opl[[+idx]]` , and changing all the "
fi" in the code to "
opl[[+idx]]", but then the forms does nothing at all.
I tried
&placeholderPrefix=`opl` and changed all the "
fi" in the code to "
opl". Now the form is submitted, but the "succesmessage" and the "errormessage" don't show anymore...
How can this be solved ? tHANKS
<div class="content-wrap">
<h4>[[+naam]]</h4>
<div class="opleiding-text-para">
[[+beschrijving]]
<p><strong>Datum: [[+datum]]</strong></p>
<p><a href="javascript:void(0)" class="btn opleiding-btn opleiding-btn[[+idx]]"> INSCHRIJVEN</a></p>
</div>
<div class="opleiding-text-form opleiding-text-form[[+idx]]">
<h4>INSCHRIJVEN </h4>
<!--- xxxxxxxxxxxx FORM CODE xxxxxxxxxxxxxxx -->
[[!FormIt?
&hooks=`spam,email,redirect,FormSave`
&fsFormTopic=`inschrijving [[+naam]] [[+datum]]`
&fsFormFields=`name,email,telephone,adres,message`
&emailTpl=`opleiding_email_TPL`
&emailFrom=`[email protected]`
&emailTo=`[[+email[[+idx]]]]`
&emailBCC=`[email protected]`
&emailSubject=`->[[+opleiding]] `
&validationErrorMessage = `Graag enkele correcties in het formulier aanbrengen aub.`
&redirectTo=`79`
&validate=`
name:required,
email:email:required,
adres:required,
telephone:required`
&name.vTextRequired= `Geef aub uw naam in.`
&email.vTextRequired= `Geef aub uw email in.`
&adres.vTextRequired= `Geef aub uw adres in.`
&telephone.vTextRequired= `Geef aub uw telefoonnummer in.`
&submitVar=`submit[[+idx]]`
]]
[[!+fi.validation_error_message:notempty=`
<p style="color: red;">[[!+fi.validation_error_message]]</p>
`]]
<form name="opleiding-form[[+idx]]" action="[[~[[*id]]]]" id="opleiding-form[[+idx]]" method="post" class="form" role="form">
<input type="hidden" name="nospam:blank" value="[[+fi.nospam]]" />
<div class="col-sm-12">
<div class="form-group">
<textarea name="opleiding" id="opleiding" class="form-control" rows="1"
placeholder="opleiding" value="[[+fi.opleiding]]" readonly>
Ik schrijf me in voor de opleiding [[+naam]] op datum van [[+datum]]
</textarea>
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="sr-only" for="name">Naam* <span class="error">[[!+fi.error.name]]</span></label>
<input type="text" class="form-control" id="name" name="name" placeholder="naam*" value="[[+fi.name]]" >
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="sr-only" for="email">E-mail* <span class="error">[[!+fi.error.email]]</span></label>
<input type="text" class="form-control" id="email" name="email" placeholder="e-mailadres*" value="[[+fi.email]]">
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="sr-only" for="adres">adres* <span class="error">[[!+fi.error.adres]]</span></label>
<input type="text" class="form-control" id="adres" name="adres" placeholder="adres*" value="[[+fi.adres]]">
</div>
</div>
<div class="col-sm-6" >
<div class="form-group">
<label class="sr-only" for="telephone">Telefoon* <span class="error">[[!+fi.error.telephone]]</span></label>
<input type="text" class="form-control" id="telephone" name="telephone" maxlength="10" placeholder="telefoonnummer*" value="[[+fi.telephone]]">
</div>
</div>
<div class="col-sm-12" >
<div class="form-group">
<label for="message" class="sr-only">boodschap <span class="error">[[!+fi.error.message]]</span></label>
<textarea name="message" id="message" class="form-control" rows="6"
placeholder="boodschap" value="[[+fi.message]]"></textarea>
</div>
</div>
<div class="col-sm-12" >
<button type="submit" name="submit[[+idx]]" value=" " class="btn btn-opleiding-form ">VERZENDEN</button>
</div>
</form>
</div>
</div>