FX Captcha Validation - (by Felice Di Stefano)
This server behavior will create the required code to validate the form using the captcha image.
Applying
Create the dynamic page with the form to validate then add to the form a text field where to insert the validation code and give a name, open the FX Captcha Validation dialog from the FX Captcha server behaviors submenu and define the parameters.
| Form Name: | Select the form to validate. |
| Code Field: | Select the field you created to insert the code. |
| Captcha File: | Browse to the file you created in advance for the captcha image and select it. |
| Empty Msg: | Insert an error message in case the code field is left empty. |
| Failed Msg: | Insert an error message in case the inserted code field is not matching the one from the captcha image. |
After that click OK. An image object appears beside the Code Field which represents the captcha image and the {fx.captchaerr} object will appear below the selected form, you can move these objects where you want.
To hold the element values for each element write inside the value property this code:
for PHP <?php echo @$elementname; ?>
for ASP <%=Session("elementname")%>
where elementname is the name of the element, for instance if the element name is "FirstName" the code will be <?php echo @$FirstName; ?> or <%=Session("FirstName")%> .
In case you are using the XServer Form Validator extension you may use its features to hold element values.
If, when loading this page with PHP code, an error message on a empty display about the GD library appears that means the mentioned library is not installed and the image cannot be created, install it or ask to the server administrator about it.
by FELIXONE