Skip to content

Commit d82494c

Browse files
committed
Explain things better
1 parent ab6dc74 commit d82494c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

reference/constraints/File.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,12 @@ You can find a list of existing mime types on the `IANA website`_.
245245
.. note::
246246

247247
When using this constraint on a :doc:`FileType field </reference/forms/types/file>`,
248-
the value of this option is also used in the ``accept`` attribute of the
249-
related ``<input type="widget"/>`` HTML element (unless the field defines
250-
its own ``accept`` value).
248+
the value of the ``mimeTypes`` option is also used in the ``accept``
249+
attribute of the related ``<input type="widget"/>`` HTML element.
250+
251+
This behavior is applied only when using :ref:`form type guessing <forms-field-guessing>`
252+
(i.e. the form type is not defined explicitly in the ``->add()`` method of
253+
the form builder) and when the field doesn't define its own ``accept`` value.
251254

252255
.. versionadded:: 4.4
253256

0 commit comments

Comments
 (0)