mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 12:31:06 -05:00
autofill check
This commit is contained in:
parent
d8a13996ec
commit
806b84b379
@ -19,6 +19,7 @@
|
||||
* - _valid_captcha()
|
||||
* - _valid_ip()
|
||||
* - _blockwords_check()
|
||||
* - _autofill_check()
|
||||
* - _valid_authentication()
|
||||
* - get_cm_js()
|
||||
* - error_404()
|
||||
@ -340,6 +341,11 @@ class Main extends CI_Controller
|
||||
'label' => 'No blocked words',
|
||||
'rules' => 'callback__blockwords_check',
|
||||
) ,
|
||||
array(
|
||||
'field' => 'email',
|
||||
'label' => 'Field must remain empty',
|
||||
'rules' => 'callback__autofill_check',
|
||||
) ,
|
||||
);
|
||||
|
||||
//form validation
|
||||
@ -643,6 +649,16 @@ class Main extends CI_Controller
|
||||
return true;
|
||||
}
|
||||
|
||||
function _autofill_check()
|
||||
{
|
||||
|
||||
//setup message
|
||||
$this->form_validation->set_message('_autofill_check', 'Go away, robot!');
|
||||
|
||||
//check
|
||||
return !$this->input->post('email');
|
||||
}
|
||||
|
||||
function _valid_authentication()
|
||||
{
|
||||
|
||||
|
@ -116,6 +116,11 @@
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
$set = array('name' => 'email', 'hidden' => 'hidden');
|
||||
echo form_input($set);
|
||||
?>
|
||||
|
||||
<div><button type="submit" value="submit" name="submit">Create</button></div>
|
||||
<div class="spacer"></div>
|
||||
</form>
|
||||
|
Loading…
x
Reference in New Issue
Block a user