summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers
diff options
context:
space:
mode:
authorvlakoff <vlakoff@gmail.com>2013-08-06 20:25:14 +0200
committervlakoff <vlakoff@gmail.com>2013-08-07 09:51:13 +0200
commit1c75780da904b2a56c30c693fc3e03d2145614c2 (patch)
treed9aaf2756135df57af12001fc4955099c457d628 /user_guide_src/source/helpers
parentc0b55d53004105bca7f7979931d46fd848e21be0 (diff)
Fix a few more merge conflicts
Diffstat (limited to 'user_guide_src/source/helpers')
-rw-r--r--user_guide_src/source/helpers/form_helper.rst44
-rw-r--r--user_guide_src/source/helpers/smiley_helper.rst4
2 files changed, 26 insertions, 22 deletions
diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst
index 5bc5887aa..8ad8f7dcd 100644
--- a/user_guide_src/source/helpers/form_helper.rst
+++ b/user_guide_src/source/helpers/form_helper.rst
@@ -47,7 +47,7 @@ The following functions are available:
The above example would create a form that points to your base URL plus the
"email/send" URI segments, like this::
- <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send" />
+ <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send">
**Adding Attributes**
@@ -57,9 +57,13 @@ The following functions are available:
$attributes = array('class' => 'email', 'id' => 'myform');
echo form_open('email/send', $attributes);
- The above example would create a form similar to this::
+ Alternatively, you can specify the second parameter as a string::
+
+ echo form_open('email/send', 'class="email" id="myform"');
+
+ The above examples would create a form similar to this::
- <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send" class="email" id="myform" />
+ <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send" class="email" id="myform">
**Adding Hidden Input Fields**
@@ -69,6 +73,8 @@ The following functions are available:
$hidden = array('username' => 'Joe', 'member_id' => '234');
echo form_open('email/send', '', $hidden);
+ You can skip the second parameter by passing any falsy value to it.
+
The above example would create a form similar to this::
<form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send">
@@ -248,10 +254,10 @@ The following functions are available:
Example::
$options = array(
- 'small' => 'Small Shirt',
- 'med' => 'Medium Shirt',
- 'large' => 'Large Shirt',
- 'xlarge' => 'Extra Large Shirt',
+ 'small' => 'Small Shirt',
+ 'med' => 'Medium Shirt',
+ 'large' => 'Large Shirt',
+ 'xlarge' => 'Extra Large Shirt',
);
$shirts_on_sale = array('small', 'large');
@@ -389,16 +395,14 @@ The following functions are available:
the box should be checked or not.
Similar to the other form functions in this helper, you can also pass an
- array of attributes to the function
-
- ::
+ array of attributes to the function::
$data = array(
- 'name' => 'newsletter',
- 'id'      => 'newsletter',
- 'value'   => 'accept',
- 'checked' => TRUE,
- 'style'   => 'margin:10px'
+ 'name' => 'newsletter',
+ 'id' => 'newsletter',
+ 'value' => 'accept',
+ 'checked' => TRUE,
+ 'style' => 'margin:10px'
);
echo form_checkbox($data);
@@ -495,11 +499,11 @@ The following functions are available:
form to contain::
$data = array(
- 'name' => 'button',
- 'id' => 'button',
- 'value' => 'true',
- 'type' => 'reset',
- 'content' => 'Reset'
+ 'name' => 'button',
+ 'id' => 'button',
+ 'value' => 'true',
+ 'type' => 'reset',
+ 'content' => 'Reset'
);
echo form_button($data);
diff --git a/user_guide_src/source/helpers/smiley_helper.rst b/user_guide_src/source/helpers/smiley_helper.rst
index 7ac91c345..0601f0244 100644
--- a/user_guide_src/source/helpers/smiley_helper.rst
+++ b/user_guide_src/source/helpers/smiley_helper.rst
@@ -48,7 +48,7 @@ View as described.
The Controller
--------------
-In your `application/controllers/` folder, create a file called
+In your **application/controllers/** directory, create a file called
Smileys.php and place the code below in it.
.. important:: Change the URL in the :func:`get_clickable_smileys()`
@@ -75,7 +75,7 @@ the :doc:`Table Class <../libraries/table>`::
}
-In your `application/views/` folder, create a file called `smiley_view.php`
+In your **application/views/** folder, create a file called **smiley_view.php**
and place this code in it::
<html>