Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden data in form_for tag #7461

Closed
wants to merge 8 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions actionpack/lib/action_view/helpers/form_tag_helper.rb
Expand Up @@ -745,6 +745,13 @@ def extra_tags_for_form(html_options)
end

tags = utf8_enforcer_tag << method_tag

if hidden_data = html_options.delete("hidden_data")
hidden_data.map{|name, value|
tags << text_field_tag(name, value, {"type" => "hidden"})
}
end

content_tag(:div, tags, :style => 'margin:0;padding:0;display:inline')
end

Expand Down