From 877ec2a3f6245362e78ffbaf712a81676850a075 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Wed, 4 Feb 2009 12:29:09 +0000 Subject: added a note explicitly outlining id as a settable option in form_dropdown() --- user_guide/helpers/form_helper.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide') diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html index 730acb6d0..2bb2a4a3a 100644 --- a/user_guide/helpers/form_helper.html +++ b/user_guide/helpers/form_helper.html @@ -170,7 +170,7 @@ echo form_input($data);
// Would produce:

<input type="text" name="username" id="username" value="johndoe" maxlength="100" size="50" style="width:50%" /> -

If you would like your form to contain some additional data, like JavaScript, you can pass it as a string in the +

If you would like your form to contain some additional data, like Javascript, you can pass it as a string in the third parameter:

$js = 'onClick="some_function()"';
@@ -232,10 +232,10 @@ echo form_dropdown('shirts', $options, $shirts_on_sale);
</select>
-

If you would like the opening <select> to contain additional data, like JavaScript, you can pass it as a string in the +

If you would like the opening <select> to contain additional data, like an id attribute or JavaScript, you can pass it as a string in the fourth parameter:

-$js = 'onChange="some_function()"';
+$js = 'id="shirts" onChange="some_function();"';

echo form_dropdown('shirts', $options, 'large', $js);
-- cgit v1.2.3-24-g4f1b