Skip over navigation

RXML Code

First RXML component

<nocache>
<emit source="captcha">
<div style="margin-left:1em;">
  <p><label for="response">CAPTCHA:</label></p>
  <img src="&_.url;" height="&_.image-height;" width="&_.image-width;"/>
  <p>In the form field below, type the characters that appear in the CAPTCHA image. The CAPTCHA is not case-sensitive.</p>
  <input type="hidden" name="secret" value="&_.secret;" />
</div>
</emit>
</nocache>

Form: Text component

Insert a Form: Text component with the RXML handle — response


Second RXML component

 
<!-- form-mode:validate -->

<nocache>
<captcha-verify response="&form.response;" secret="&form.secret;">
  CAPTCHA verification was successful.
</captcha-verify>
<else>
<set variable="var.form-invalid"/>
<set variable="var.form-invalid-response/">
</else>
</nocache>