Smutty

MVC Framework

View Code: function.checkbox

Browse: All · Classes · Plugins

1
<?php
2
3
/**
4
* returns the html for a form checkbox field
5
*
6
* @param array $params parameters
7
* @param Smarty $smarty smarty object
8
* @return the element html
9
*
10
*/
11
12
function smutty_function_checkbox( $params, $smarty ) {
13
14
$smarty->depend( 'function', 'field' );
15
16
$params['type'] = 'checkbox';
17
$params['checked'] = v($params,'value') ? 'checked' : '';
18
19
return smutty_function_field( $params, $smarty );
20
21
}
22
23
function smarty_function_checkbox( $params, $smarty ) {
24
echo smutty_function_checkbox( $params, $smarty );
25
}
26
27
?>

The code shown here is the code that is currently running this site. If you want to view the latest SVN version of the code then go to the Subversion repository.