Skip to content

Commit 162be9f

Browse files
authored
Merge pull request rails#49350 from bhanubhakta/bhanubhakta-include-hidden-file-field-docs
Update doc for `include_hidden` form form file_field.
2 parents d8391b2 + 72b3fe9 commit 162be9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actionview/lib/action_view/helpers/form_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2521,7 +2521,7 @@ def hidden_field(method, options = {})
25212521
# * Creates standard HTML attributes for the tag.
25222522
# * <tt>:disabled</tt> - If set to true, the user will not be able to use this input.
25232523
# * <tt>:multiple</tt> - If set to true, *in most updated browsers* the user will be allowed to select multiple files.
2524-
# * <tt>:include_hidden</tt> - When <tt>multiple: true</tt> and <tt>include_hidden: true</tt>, the field will be prefixed with an <tt><input type="hidden"></tt> field with an empty value to support submitting an empty collection of files.
2524+
# * <tt>:include_hidden</tt> - When <tt>multiple: true</tt> and <tt>include_hidden: true</tt>, the field will be prefixed with an <tt><input type="hidden"></tt> field with an empty value to support submitting an empty collection of files. Since <tt>include_hidden</tt> will default to <tt>config.active_storage.multiple_file_field_include_hidden</tt> if you don't specify <tt>include_hidden</tt>, you will need to pass <tt>include_hidden: false</tt> to prevent submitting an empty collection of files when passing <tt>multiple: true</tt>.
25252525
# * <tt>:accept</tt> - If set to one or multiple mime-types, the user will be suggested a filter when choosing a file. You still need to set up model validations.
25262526
#
25272527
# ==== Examples

0 commit comments

Comments
 (0)