Forms

Forms in dotAdmin are handled by the /forms controller:

<form method="[post/get]" action="/form">

Spam Filtering

dotAdmin also has some basic spam filtering functionality which can be used to weed out form spam. To use this, you can add some javascript to your templates, and a hidden field to your forms

Javascript

<script src="/javascript/daformcheck.js"></script>

More info on using the daformcheck here.

Hidden form field

<input type="hidden" name="daformref" value="" />

Google Recaptcha

You can also use Google Recaptcha in your forms.

Javascript

<script src="https://www.google.com/recaptcha/api.js"></script> 
<script>
function reCaptchaEnableSubmit(){
	$('.recaptcha-submit').attr("disabled", false);
}
$('document').ready(function(){
	$('.recaptcha-submit').attr("disabled", true);
});
</script>

Recpatcha UI and submit buttons

<div>
	<?php $this->getTemplate('recaptcha_fields') ?>
</div>
<div>
	<input type="submit" name="submit" value="Submit" class="recaptcha-submit" />
</div>

Contact Us

Address: 22a Fishergate York, YO10 4AB · Tel: 01904 636677 · Email: info@dotadmin.com