I'm trying to get the error messages to appear below each form element if it does not validate properly - within a customised multi page form that allows incomplete submissions. I am not sure how to go about this. If I don't customise the form and just using %form_contents% keyword in the 'Form Contents' bodycopy, everything is 'sweet' and error messages appear below each incorrectly validated form element.
However, I need to heavily customise the form with some 'JQuery trickery' and I have just customised each section and put HTML into the bodycopy (grabbed the HTML by previewing the section before applying a bodycopy customisation). Now I have put the error code keyword underneath each form element for it to display error messages if incorrectly formatted - but all I still get is the general error message that is coming from the top level 'Form Contents' bodycopy. This is not enough feedback to form users, I want to give specific error message underneath each form element.
Is this possible? I'll cut and paste an example of my code below:
<div class="sq-form-question sq-form-question-tickbox-list sq-form-question-error" style="margin-top: 30px;"> <fieldset> <legend class="sq-form-question-title">Are there any other training topics not covered that you think could be of interest to seniors in your community? <abbr class="sq-form-required-field" title="required">*</abbr></legend> <em class="sq-form-question-note">(if yes, please list topics below)</em> <div class="sq-form-question-answer"><input name=“q291589:q6[]” id=“q291589_q6_0” value=“0” tabindex=“6” class=“sq-form-field” type=“checkbox”>
<label for=“q291589_q6_0”>Yes</label>
<input name=“q291589:q6[]” id=“q291589_q6_1” value=“1” tabindex=“6” class=“sq-form-field” type=“checkbox”>
<label for=“q291589_q6_1”>No</label></div>
</fieldset>
<p id=“error_291589_q6” class=“sq-form-error”>%question_error_291589_q6%</p>
</div>
<div class=“sq-form-question sq-form-question-text” id=“q291589_q7” style=“display:none;”>
<!-- <label class=“sq-form-question-title” for=“q291589_q7”>list training topics</label> -->
<div class=“sq-form-question-answer”>
<input name=“q291589:q7” value="" size=“100” maxlength=“300” id=“q291589_q7” tabindex=“7” class=“sq-form-field” type=“text”>
</div>
</div>