';
foreach ($errors[$name] as $error) {
$html .= '
'.escape($error).'';
}
$html .= '';
}
return $html;
}
function form_value($values, $name)
{
if (isset($values->$name)) {
return 'value="'.escape($values->$name).'"';
}
return isset($values[$name]) ? 'value="'.escape($values[$name]).'"' : '';
}
function form_hidden($name, $values = array())
{
return '';
}
function form_select($name, array $options, $values = array(), array $errors = array(), $class = '')
{
$html = '';
$html .= error_list($errors, $name);
return $html;
}
function form_radio($name, $label, $value, $checked = false, $class = '')
{
return '';
}
function form_checkbox($name, $label, $value, $checked = false, $class = '')
{
return '';
}
function form_label($label, $name, $class = '')
{
return '';
}
function form_input($type, $name, $values = array(), array $errors = array(), array $attributes = array(), $class = '')
{
$class .= error_class($errors, $name);
$html = '';
$html .= error_list($errors, $name);
return $html;
}
function form_text($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '')
{
return form_input('text', $name, $values, $errors, $attributes, $class);
}
function form_password($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '')
{
return form_input('password', $name, $values, $errors, $attributes, $class);
}
function form_number($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '')
{
return form_input('number', $name, $values, $errors, $attributes, $class);
}