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