You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/forms.md
+79-1Lines changed: 79 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ In the template:
77
77
</form>
78
78
```
79
79
80
-
Each element in the form can be rendered as required by the developer. Internally, [Phalcon\Tag][tag] is used to produce the correct HTML for each element, and you can pass additional HTML attributes as the second parameter of `render()`:
80
+
Each element in the form can be rendered as required by the developer. Internally, [Phalcon\Html\TagFactory][tagfactory] is used to produce the correct HTML for each element, and you can pass additional HTML attributes as the second parameter of `render()`:
81
81
82
82
```php
83
83
<p>
@@ -737,6 +737,84 @@ Because of the way forms work and interact with elements, certain names are rese
737
737
738
738
These names correspond to getters in the `Form` object or are properties coming from the Di container.
739
739
740
+
### Radios
741
+
Radio elements are a bit different from other elements. A radio element represents a group of options where only one option can be selected. The `Phalcon\Forms\Element\Radio` element is used to create a single radio button. To create a group of radio buttons, you will need to add multiple `Phalcon\Forms\Element\Radio` elements to your form with the same name but different values:
742
+
743
+
One thing to note is that the name of the element (first parameter for the `Radio` class) is not the name attribute that will be rendered in the HTML. It is merely a way to identify the specific `Radio` element in the form.
744
+
745
+
Assume you have to create two radio elements in your form:
0 commit comments