-
Notifications
You must be signed in to change notification settings - Fork 7.5k
button to
eliasdorneles edited this page Aug 3, 2012
·
5 revisions
The idea is simple (and copied from Rails): it is a helper that creates a post form with a submit button. Optionally, it can have input hiddens as a array in the last parameter.
It has great value in lists of records that have options that are not "elegant" send them as get parameters.
'value' )) ?>
'Button value', 'class' => 'css Class') ,
'controller/action', array('hidden_name' => 'value' )) ?>
config->site_url($destination)}' method='post'>";
if (!empty($hiddens))
{
foreach ($hiddens as $key => $value)
$html .= "";
}
if (is_array($button_format))
{
$html .= " $value)
$html .= $key . "='". $value . "' ";
$html .= "/>";
} else {
$html .= "";
}
$html .= "";
return $html;
}
}