FUEL CMS User Guide : Version 1.5.2


Forms Helper

Contains functions for the {module_name} module

Function Reference [+]

form('$name', [$params=array()])

Convenience function to easily create forms and is an alias to $this->fuel->forms->get()->render();.

Returns

string

Parameters

(string) $name The name of the form
(array) $params An array of configuration parameters

Example


 echo form('contact', array('javascript_validate' => FALSE, 'javascript_submit' => FALSE, 
		'fields' => array(
			'name' => array('required' => TRUE),
			'email' => array('required' => TRUE),
		)));
 

blacklisted([$ips=array()])

Returns TRUE/FALSE if the current Remote IP address is blacklisted. Used during validation.

Returns

boolean

Parameters

(array) $ips An array of IP addresses (optional)

validate_akismet('$api_key', '$name', '$email', '$msg')

Returns TRUE/FALSE as to whether the passed parameters get through Akismet. Used during validation.

Returns

boolean

Parameters

(string) $api_key The API key
(string) $name The name of the person submitting the form. Will pull from post
(string) $email The email address of the person submitting the form
(string) $msg The message being submitted

validate_recaptcha('$private_key')

Returns TRUE/FALSE as to whether the reCAPTCHA value is correct. Used during validation.

Returns

boolean

Parameters

(string) $private_key The private API key.