Doing something like:
echo form_tag_for($form, "@article?category_id={$category->id}")
Will result in a routing error when you submit the form because the url generated for the form's action will be something like article?category_id=29_create
This is because url_for_form doest detect if routes starting with @ are using extra parameters.
To fix this issue, just change the following part of url_for_form
if ('@' == $routePrefix[0])
{
$format = '%s_%s';
$routePrefix = substr($routePrefix, 1);
}
To
if ('@' == $routePrefix[0])
{
$format = '%s_%s';
$routeParts = explode('?', $routePrefix, 2);
$routePrefix = $routeParts[0];
if(count($routeParts) == 2)
{
$format .= "?{$routeParts[1]}";
}
}