- "Ask the Expert" or Advice Column
- "Must Have" Modules
- A Challenge
- Books Overview
- Changing Garland - A Practical Example
- Comparison of Links and Web Links modules
- Create Simple Tables
- Creating a "Biographies" page
- Developing a Module on a Windows System
- Generic Table Display
- How to page a custom DB query
- List Users From a Single Role in a Block
- My Modules
- Announcements: Special Notices for Your Site
- Attendance Matrix
- Content Type Template
- FAQ_Ask
- Get Content Type
- Glossary
- Gotcha - Contact Spam Catcher
- Helpers
- Indexpage: summary of node type information
- Longer Node Titles
- Node Type Filter
- Quotes
- RealName: Using Profile fields to set a user's displayed name
- Register_Country
- Site Documentation Module
- Site Notes: Hidden Design or How To notes in Your Database
- Spam Tokens
- Spam Tune
- Taxonomy Browser
- Taxonomy Delegate
- Taxonomy Image: Associate Images with Taxonomy Terms
- Taxonomy List: Displaying Lists of Terms
- SBS Web Site Notes
- Searching for a New Hosting Company
- Taxonomy Tidbits
- Theming a Specific Content Type
Helpers Form Functions
Submitted on Thu, 01/24/2008 - 02:49.
Functions
countries_select_for_form($title = '', $default_value = NULL, $required = FALSE, $description = '', $multiple = FALSE)
Build a form-structure filled with countries; this can be used in a select list.
- Calling parameters
- $title
- the title of the form. Defaults to "Countries" (translated). If provided, it will not be translated.
- $default_value
- the selected country.
- $required
- whether or not a "none" string should be included in the options.
- $description
- optionally provide a description. Is not translated.
- $multiple
- whether or not to allow multiple choices.
- Return
- A completed form element ready to be used.
states_select_for_form($title = '', $default_value = NULL, $required = FALSE, $description = '', $multiple = FALSE)
- Calling parameters
- $title
- the title of the form. Defaults to "States" (translated). If provided, it will not be translated.
- $default_value
- the selected state.
- $required
- whether or not a "none" string should be included in the options.
- $description
- optionally provide a description. Is not translated.
- $multiple
- whether or not to allow multiple choices.
- Return
- A completed form element ready to be used.
month_select_for_form($title = '', $default_value = NULL, $required = FALSE, $description = '', $multiple = FALSE)
- Calling parameters
- $title
- the title of the form. Defaults to "Month" (translated). If provided, it will not be translated.
- $default_value
- the selected month.
- $required
- whether or not a "none" string should be included in the options.
- $description
- optionally provide a description. If provided, it will not be translated.
- $multiple
- whether or not to allow multiple choices.
- Return
- A completed form element ready to be used.
year_select_for_form($range = 10, $start = 'current', $title = '', $default_value = NULL, $required = FALSE, $description = '', $multiple = FALSE)
- Calling parameters
- $range
- The number of years to show from the specified starting year. If this value is negative, then only use the number of years before. If it is positive, then show the number of years before and after.
- $start
- The year to start the list with. If specified (or defaulted) as "current" then, use the current year.
- $title
- The title of the form element. Defaults to "Year" (translated). If provided, it will not be translated.
- $default_value
- The selected year.
- $required
- Whether or not a "none" string should be included in the options.
- $description
- Optionally provide a description. If provided, it will not be translated.
- $multiple
- whether or not to allow multiple choices.
- Return
- A completed form element ready to be used.
add_none_to_options($options, $none_string = NULL)
Add a "None" option to an option list.
- Calling parameters
- $options
- the options to which you want to append "None."
- $none_string
- Optional string that will be the "none". If you provide this, it will not be translated and not passed trough the themeFor web sites, this refers to the "look and feel" of the site. It is also used to describe the code to produce that look. layer.
- Return
- A modified options list with the None option added.



Recent comments
2 weeks 4 hours ago
2 weeks 4 hours ago
2 weeks 4 hours ago
2 weeks 4 hours ago
2 weeks 4 hours ago
3 weeks 4 days ago
4 weeks 4 days ago
6 weeks 3 days ago
7 weeks 3 days ago
10 weeks 3 hours ago