File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
user_guide_src/source/helpers Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ The following functions are available:
175175
176176 .. literalinclude :: form_helper/014.php
177177
178+ If you want boolean attributes, pass the boolean value (``true ``/``false ``). In this case the boolean value does not matter:
179+
180+ .. literalinclude :: form_helper/035.php
181+
178182 If you would like your form to contain some additional data, like
179183 JavaScript, you can pass it as a string in the third parameter:
180184
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ data = [
4+ 'name ' => 'username ' ,
5+ 'id ' => 'username ' ,
6+ 'value ' => '' ,
7+ 'required ' => true ,
8+ ];
9+ echo form_input ($ data );
10+ /*
11+ * Would produce:
12+ * <input type="text" name="username" value="" id="username" required />
13+ */
You can’t perform that action at this time.
0 commit comments