Hi,
I have a Joomla 1.5/Chronoforms 3.2 Installation.
I have a contact form which is flooded by Spam the last weeks.
The client-side validation doesn´t work, because for example there are cryptical inputs in email fields allthough it is checked for a correct email address syntax.
I also have a requiered Checkbox field:
When somone correctly checked the box and submits the form, the database entry of the form field value is "check 1".
Then, with help of the forum I managed to set up a server side validation of the checkbox field.:
But...When I look at the database entries of the spam entries, there is a value in the form field, like the string "Bestimmtes Thema". So this value seems to be inserted by the spam bot and the serverside validation "thinks" that it is a correct value.
Then I tested this server side validation:
But then also my usual form submits run into this error, even if I check the Checkbox.
Am I missing something here?
Thanks in advance!
Malte
I have a Joomla 1.5/Chronoforms 3.2 Installation.
I have a contact form which is flooded by Spam the last weeks.
The client-side validation doesn´t work, because for example there are cryptical inputs in email fields allthough it is checked for a correct email address syntax.
I also have a requiered Checkbox field:
<div class="form_item">
<div class="form_element cf_checkbox">
<div class="float_left">
<input value="check 1" title="" class="radio validate-one-required" id="check00" name="check0[]" type="checkbox" />
<label for="check00" class="check_label">Ja, ich habe die <a href="index.php?option=com_content&view=article&id=9&Itemid=17" target="_parent">AGB</a> gelesen und akzeptiere diese.</label>
</div>
</div>
</div>
When somone correctly checked the box and submits the form, the database entry of the form field value is "check 1".
Then, with help of the forum I managed to set up a server side validation of the checkbox field.:
<?php
$messages = array();
$agree = JRequest::getString('check0', 'empty', 'post');
if ( $agree == 'empty' ) {
$messages[] = "Bitte bestätigen Sie die AGB.";
}
// check if there are any error messages and return
if ( count($messages) ) {
return implode('<br />', $messages);
}
?>
But...When I look at the database entries of the spam entries, there is a value in the form field, like the string "Bestimmtes Thema". So this value seems to be inserted by the spam bot and the serverside validation "thinks" that it is a correct value.
Then I tested this server side validation:
<?php
$messages = array();
$agree = JRequest::getString('check0', 'empty', 'post');
if ( $agree != 'check 1' ) {
$messages[] = "Bitte bestätigen Sie die AGB.";
}
// check if there are any error messages and return
if ( count($messages) ) {
return implode('<br />', $messages);
}
?>
But then also my usual form submits run into this error, even if I check the Checkbox.
Am I missing something here?
Thanks in advance!
Malte