| [ Index ] |
PHP Cross Reference of Akelos Framework |
[Source view] [Print]
(no description)
| Author: | Bermi Ferrer |
| Copyright: | Copyright (c) 2002-2006, Akelos Media, S.L. http://www.akelos.org |
| License: | GNU Lesser General Public License |
| File Size: | 207 lines (8 kb) |
| Included or required: | 1 time |
| Referenced: | 0 times |
| Includes or requires: | 3 files AkActionView/helpers/asset_tag_helper.php AkActionView/AkActionViewHelper.php AkActionView/helpers/tag_helper.php |
FormTagHelper:: (13 methods):
form_tag()
start_form_tag()
end_form_tag()
select_tag()
text_field_tag()
hidden_field_tag()
file_field_tag()
password_field_tag()
text_area_tag()
check_box_tag()
radio_button_tag()
submit_tag()
image_submit_tag()
Class: FormTagHelper - X-Ref
Provides a number of methods for creating form tags that doesn't rely on conventions with an object assigned to the template like| form_tag($url_for_options = array() X-Ref |
| Starts a form tag that points the action to an url configured with <tt>url_for_options</tt> just like $controller->urlFor. The method for the form defaults to POST. Options: * <tt>'multipart'</tt> - If set to true, the enctype is set to "multipart/form-data". * <tt>'method'</tt> - The method to use when submitting the form, usually either "get" or "post". |
| start_form_tag($url_for_options = array() X-Ref |
| No description |
| end_form_tag() X-Ref |
| Outputs '</form>' |
| select_tag($name, $option_tags = null, $options = array() X-Ref |
| Creates a dropdown selection box, or if the <tt>'multiple'</tt> option is set to true, a multiple choice selection box. Helpers::FormOptions can be used to create common select boxes such as countries, time zones, or associated records. <tt>option_tags</tt> is a string containing the option tags for the select box: # Outputs <select id="people" name="people"><option>David</option></select> $form_tag_helper->select_tag('people', '<option>David</option>'); Options: * <tt>'multiple'</tt> - If set to true the selection will allow multiple choices. |
| text_field_tag($name, $value = null, $options = array() X-Ref |
| Creates a standard text field. Options: * <tt>'disabled'</tt> - If set to true, the user will not be able to use this input. * <tt>'size'</tt> - The number of visible characters that will fit in the input. * <tt>'maxlength'</tt> - The maximum number of characters that the browser will allow the user to enter. An array of standard HTML options for the tag. |
| hidden_field_tag($name, $value = null, $options = array() X-Ref |
| Creates a hidden field. Takes the same options as text_field_tag |
| file_field_tag($name, $options = array() X-Ref |
| Creates a file upload field. If you are using file uploads then you will also need to set the multipart option for the form: <?= $form_tag_helper->form_tag(array('action'=>'post'),array('multipart'=>true)); ?> <label for="file">File to Upload</label> <?= $form_tag_helper->file_field_tag('file'); ?> <?= $form_tag_helper->submit_tag(); ?> <?= $form_tag_helper->end_form_tag(); ?> |
| password_field_tag($name = 'password', $value = null, $options = array() X-Ref |
| Creates a password field. Takes the same options as text_field_tag |
| text_area_tag($name, $content = null, $options = array() X-Ref |
| Creates a text input area. Options: * <tt>'size'</tt> - A string specifying the dimensions of the textarea. # Outputs <textarea name="body" id="body" cols="25" rows="10"></textarea> <?= $form_tag_helper->text_area_tag('body', null, array('size'=>'25x10')); ?> |
| check_box_tag($name, $value = '1', $checked = false, $options = array() X-Ref |
| Creates a check box. |
| radio_button_tag($name, $value, $checked = false, $options = array() X-Ref |
| Creates a radio button. |
| submit_tag($value = null, $options = array() X-Ref |
| Creates a submit button with the text <tt>value</tt> as the caption. If options contains a pair with the key of "disable_with", then the value will be used to rename a disabled version of the submit button. |
| image_submit_tag($source, $options = array() X-Ref |
| Displays an image which when clicked will submit the form. <tt>source</tt> is passed to AssetTagHelper#image_path |
| Generated: Mon Oct 27 12:43:49 2008 | Cross-referenced by PHPXref 0.6 |