You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be lovely to be able to generate the hidden input element for form actions… We already have shortcuts for csrfInput() and redirectInput(), so this feels like a handy addition.
Effectively, thinking something like this:
// new \Twig_SimpleFunction('actionInput', [$this, 'actionInputFunction'])// .../** * Returns an action input wrapped in a \Twig_Markup object. * * @return \Twig_Markup|null */publicfunctionactionInputFunction($actionPath)
{
return TemplateHelper::raw('<input type="hidden" name="action" value="' . $actionPath . '">');
}
(I wasn't sure whether the name of the field depends on the actionTrigger setting?)
Happy to issue a PR—but wanted to make sure I wasn't missing something that's already available!
The text was updated successfully, but these errors were encountered:
Description
It'd be lovely to be able to generate the hidden
input
element for form actions… We already have shortcuts forcsrfInput()
andredirectInput()
, so this feels like a handy addition.Effectively, thinking something like this:
(I wasn't sure whether the name of the field depends on the
actionTrigger
setting?)Happy to issue a PR—but wanted to make sure I wasn't missing something that's already available!
The text was updated successfully, but these errors were encountered: