Skip to content

Commit a820bde

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: URLType: explain `null` value for `default_protocol`
2 parents df58a32 + a798057 commit a820bde

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

reference/forms/types/url.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ Field Options
2525

2626
**type**: ``string`` **default**: ``http``
2727

28+
Set this value to ``null`` to render the field using a ``<input type="url"/>``,
29+
allowing the browser to perform local validation before submission.
30+
31+
When this value is neither ``null`` nor an empty string, the form field is
32+
rendered using a ``<input type="text"/>``. This ensures users can submit the
33+
form field without specifying the protocol.
34+
2835
If a value is submitted that doesn't begin with some protocol (e.g. ``http://``,
2936
``ftp://``, etc), this protocol will be prepended to the string when
3037
the data is submitted to the form.

0 commit comments

Comments
 (0)