Skip to content

Commit 174b701

Browse files
authored
Merge pull request #4078 from totoprayogo1916/userguide/fix-mistake
Fix userguide indent
2 parents e67d29f + e093c2d commit 174b701

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed

user_guide_src/source/helpers/form_helper.rst

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,16 @@ The following functions are available:
153153
... or you can submit an associative array to create multiple fields::
154154

155155
$data = [
156-
'name' => 'John Doe',
157-
'email' => 'john@example.com',
158-
'url' => 'http://example.com'
156+
'name' => 'John Doe',
157+
'email' => 'john@example.com',
158+
'url' => 'http://example.com'
159159
];
160160

161161
echo form_hidden($data);
162162

163163
/*
164164
Would produce:
165+
165166
<input type="hidden" name="name" value="John Doe" />
166167
<input type="hidden" name="email" value="john@example.com" />
167168
<input type="hidden" name="url" value="http://example.com" />
@@ -170,9 +171,9 @@ The following functions are available:
170171
You can also pass an associative array to the value field::
171172

172173
$data = [
173-
'name' => 'John Doe',
174-
'email' => 'john@example.com',
175-
'url' => 'http://example.com'
174+
'name' => 'John Doe',
175+
'email' => 'john@example.com',
176+
'url' => 'http://example.com'
176177
];
177178

178179
echo form_hidden('my_array', $data);
@@ -188,11 +189,11 @@ The following functions are available:
188189
If you want to create hidden input fields with extra attributes::
189190

190191
$data = [
191-
'type' => 'hidden',
192-
'name' => 'email',
193-
'id' => 'hiddenemail',
194-
'value' => 'john@example.com',
195-
'class' => 'hiddenemail'
192+
'type' => 'hidden',
193+
'name' => 'email',
194+
'id' => 'hiddenemail',
195+
'value' => 'john@example.com',
196+
'class' => 'hiddenemail'
196197
];
197198

198199
echo form_input($data);
@@ -605,17 +606,17 @@ The following functions are available:
605606
.. php:function:: set_value($field[, $default = ''[, $html_escape = TRUE]])
606607
607608
:param string $field: Field name
608-
:param string $default: Default value
609-
:param bool $html_escape: Whether to turn off HTML escaping of the value
610-
:returns: Field value
611-
:rtype: string
612-
613-
Permits you to set the value of an input form or textarea. You must
614-
supply the field name via the first parameter of the function. The
615-
second (optional) parameter allows you to set a default value for the
616-
form. The third (optional) parameter allows you to turn off HTML escaping
617-
of the value, in case you need to use this function in combination with
618-
i.e., :php:func:`form_input()` and avoid double-escaping.
609+
:param string $default: Default value
610+
:param bool $html_escape: Whether to turn off HTML escaping of the value
611+
:returns: Field value
612+
:rtype: string
613+
614+
Permits you to set the value of an input form or textarea. You must
615+
supply the field name via the first parameter of the function. The
616+
second (optional) parameter allows you to set a default value for the
617+
form. The third (optional) parameter allows you to turn off HTML escaping
618+
of the value, in case you need to use this function in combination with
619+
i.e., :php:func:`form_input()` and avoid double-escaping.
619620

620621
Example::
621622

@@ -649,32 +650,32 @@ The following functions are available:
649650
.. php:function:: set_checkbox($field[, $value = ''[, $default = FALSE]])
650651
651652
:param string $field: Field name
652-
:param string $value: Value to check for
653-
:param string $default: Whether the value is also a default one
654-
:returns: 'checked' attribute or an empty string
655-
:rtype: string
653+
:param string $value: Value to check for
654+
:param string $default: Whether the value is also a default one
655+
:returns: 'checked' attribute or an empty string
656+
:rtype: string
656657

657-
Permits you to display a checkbox in the state it was submitted.
658+
Permits you to display a checkbox in the state it was submitted.
658659

659-
The first parameter must contain the name of the checkbox, the second
660-
parameter must contain its value, and the third (optional) parameter
661-
lets you set an item as the default (use boolean TRUE/FALSE).
660+
The first parameter must contain the name of the checkbox, the second
661+
parameter must contain its value, and the third (optional) parameter
662+
lets you set an item as the default (use boolean TRUE/FALSE).
662663

663-
Example::
664+
Example::
664665

665666
<input type="checkbox" name="mycheck" value="1" <?= set_checkbox('mycheck', '1') ?> />
666667
<input type="checkbox" name="mycheck" value="2" <?= set_checkbox('mycheck', '2') ?> />
667668

668669
.. php:function:: set_radio($field[, $value = ''[, $default = FALSE]])
669670
670671
:param string $field: Field name
671-
:param string $value: Value to check for
672-
:param string $default: Whether the value is also a default one
673-
:returns: 'checked' attribute or an empty string
674-
:rtype: string
672+
:param string $value: Value to check for
673+
:param string $default: Whether the value is also a default one
674+
:returns: 'checked' attribute or an empty string
675+
:rtype: string
675676

676-
Permits you to display radio buttons in the state they were submitted.
677-
This function is identical to the :php:func:`set_checkbox()` function above.
677+
Permits you to display radio buttons in the state they were submitted.
678+
This function is identical to the :php:func:`set_checkbox()` function above.
678679

679680
Example::
680681

0 commit comments

Comments
 (0)