<script type="text/javascript">
	function form_7_onsubmit(form) {
		//This js code happens when user submits the form...
		$(form).find('#msg').hide();
		$(form).find('div.errors').hide().html(''); //hide error messages and clear their contents (in case user previously submitted the form but had validation errors)
		$(form).find('input.submit').hide(); //hide the submit button so user isn't tempted to click it again
		$(form).find('div.indicator').show(); //show the progress indicator so user knows something is happening
	}

	function form_7_onsuccess(form, thanks) {
		//This js code happens after form is successfully processed...
		//The 'thanks' variable is a string containing the thank-you message (as entered by the user when adding the form block)
		$(form).find('#msg').show();
		$(form).find('div.success').html(thanks).show(); //put the thanks message into its placeholder and make it visible
		$(form).find('div.indicator').hide(); //hide the progress indicator because we're done processing
		$(form).find('div.fields').hide(); //hide the field so user isn't tempted to fill it out again
	}

	function form_7_onerror(form, errors) {
		//This js code happens after form is rejected due to validation errors...
		//The 'errors' variable is a string of html containing all error messages,
		// for example: 'Please correct the following errors: <div class="error">Complete required fields *</div> <div class="error">Incorrect captcha code</div>'
		$(form).find('#msg').show();
		$(form).find('div.errors').html(errors).show(); //put the error message(s) into its placeholder and make it visible
		$(form).find('div.indicator').hide(); //hide the progress indicator because we're done processing
		$(form).find('input.submit').show(); //show the submit button so user can re-submit after fixing errors
	}
</script>

<form id="miniSurveyView7" class="miniSurveyView" method="post" action="/path/to/index.php?cID=77&bID=7&arHandle=Main&ccm_token=7777777777:77777777777777777777777777777777&btask=passthru&method=submit_form#7777777777" enctype="multipart/form-data">

	<div id="msg" style="display: none;">
		<div class="success" style="display: none;">Thanks!</div>

		<div class="errors ccm-errors" style="display: none;">
			Please correct the following errors:
			<div class="error">Complete required fields *</div>
			<div class="error">Incorrect captcha code</div>
			<div class="error">Invalid file extension.</div>
			<div class="error">Invalid file.</div>
		</div>
	</div>

	<div class="fields">
		<table class="formBlockSurveyTable">
			<tr>
				<td valign="top" align="right" class="question">
					<label for="form7_question7">First Question (Text)</label>
				</td>
				<td valign="top" align="left">
					<input id="form7_question7" name="Question7" type="text" value="" />
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label for="form7_question8">Second Question (Required Text) <span class="required">*</span></label>
				</td>
				<td valign="top" align="left">
					<input id="form7_question8" name="Question8" type="text" value="" />
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label for="form7_question9">Third Question (Textarea)</label>
				</td>
				<td valign="top" align="left">
					<textarea id="form7_question9" name="Question9" cols="50" rows="3" style="width:95%"></textarea>
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label for="form7_question10">Fourth Question (Required Textarea) <span class="required">*</span></label>
				</td>
				<td valign="top" align="left">
					<textarea id="form7_question10" name="Question10" cols="50" rows="3" style="width:95%"></textarea>
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label>Fifth Question (Radio Buttons)</label>
				</td>
				<td valign="top" align="left">
					<div class="radioList">
						<div class="radioPair"><input name="Question11" type="radio" value="First Choice" />&nbsp;First Choice</div>
						<div class="radioPair"><input name="Question11" type="radio" value="Second Choice" />&nbsp;Second Choice</div>
						<div class="radioPair"><input name="Question11" type="radio" value="Third Choice" />&nbsp;Third Choice</div>
					</div>
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label>Sixth Question (Required Radio Buttons) <span class="required">*</span></label>
				</td>
				<td valign="top" align="left">
					<div class="radioList">
						<div class="radioPair"><input name="Question12" type="radio" value="First Choice" />&nbsp;First Choice</div>
						<div class="radioPair"><input name="Question12" type="radio" value="Second Choice" />&nbsp;Second Choice</div>
						<div class="radioPair"><input name="Question12" type="radio" value="Third Choice" />&nbsp;Third Choice</div>
					</div>
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label for="form7_question13">Seventh Question (Select Box)</label>
				</td>
				<td valign="top" align="left">
					<select id="form7_question13" name="Question13" >
						<option value="" selected>----</option>
						<option >First Selection</option>
						<option >Second Selection</option>
						<option >Third Selection</option>
					</select>
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label for="form7_question14">Eighth Question (Required Select Box) <span class="required">*</span></label>
				</td>
				<td valign="top" align="left">
					<select id="form7_question14" name="Question14" >
						<option value="" selected>----</option>
						<option >First Selection</option>
						<option >Second Selection</option>
						<option >Third Selection</option>
					</select>
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label>Ninth Question (Checkbox List)</label>
				</td>
				<td valign="top" align="left">
					<div class="checkboxList">
						<div class="checkboxPair"><input name="Question15_0" type="checkbox" value="Check One" />&nbsp;Check One</div>
						<div class="checkboxPair"><input name="Question15_1" type="checkbox" value="Check Two" />&nbsp;Check Two</div>
						<div class="checkboxPair"><input name="Question15_2" type="checkbox" value="Check Three" />&nbsp;Check Three</div>
					</div>
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label>Tenth Question (Required Checkbox List) <span class="required">*</span></label>
				</td>
				<td valign="top" align="left">
					<div class="checkboxList">
						<div class="checkboxPair"><input name="Question16_0" type="checkbox" value="Check One" />&nbsp;Check One</div>
						<div class="checkboxPair"><input name="Question16_1" type="checkbox" value="Check Two" />&nbsp;Check Two</div>
						<div class="checkboxPair"><input name="Question16_2" type="checkbox" value="Check Three" />&nbsp;Check Three</div>
					</div>
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label for="form7_question17">Eleventh Question (File Upload)</label>
				</td>
				<td valign="top" align="left">
					<input id="form7_question17" type="file" name="Question17" id="" />
				</td>
			</tr>
			<tr>
				<td valign="top" align="right" class="question">
					<label for="form7_question18">Twelfth Question (Required File Upload)	<span class="required">*</span></label>
				</td>
				<td valign="top" align="left">
					<input id="form7_question18" type="file" name="Question18" id="" />
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<label>Please type the letters and numbers shown in the image.</label>
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
					<img src="/path/to/index.php/tools/required/captcha?nocache=7777777777" alt="Captcha Code" class="ccm-captcha-image" />
					<br />
					<input type="text" name="ccmCaptchaCode" class="ccm-input-captcha" />
				</td>
			</tr>

			<tr>
				<td>&nbsp;</td>
				<td>
					<input class="formBlockSubmitButton submit" name="Submit" type="submit" value="Submit" />
					<div class="indicator" style="display: none;">
						<img src="/path/to/site/concrete/images/throbber_white_16.gif" width="16" height="16" alt="" />
						<span>Processing...</span>
					</div>
					<input name="qsID" type="hidden" value="7777777777" />
					<input name="pURI" type="hidden" value="/path/to/index.php?cID=77" />
				</td>
			</tr>

		</table>

	</div><!-- .fields -->

</form>
