1.5 Template Project

The Joomla! Documentation Working Group is running a project to develop detailed reference and tutorial material on Joomla! 1.5 templates.  There is a project page on the documentation wiki where you can see the work in progress and help us by contributing your knowledge.

Who's Online

We have 13 guests online

Help Site License

The Joomla! Help Site content is copyright © 2005 - 2008 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution NonCommercial ShareAlike 2.5. Some parts of this website may be subject to other licenses.
Home arrow Developer Manual arrow 11. API Reference arrow mosHTML::monthSelectList

mosHTML::monthSelectList PDF Print E-mail

Last reviewed: Not reviewed
phpDocumentor

mosHTML::monthSelectList

A convenient method for producing a list of months in an HTML form field using the current language settings.

Syntax

string  monthSelectList ( string $tag_name, string $tag_attribs, mixed $selected )

$tag_name
is the name attribute of the HTML <select> tag..
$tag_attribs
is a string containing any additional attributes that you want to assign to the HTML <select> tag..
$selected
is either a string value for a single value select list or an array for a multiple value select list.  Note that the values used here are the month numbers with a leading zero for months 1 to 9.

Examples

Example:

$html = mosHTML::monthSelectList( 'month', 'class="inputbox"', '01' );
echo $html;

which produces:

<select name="month" class="inputbox">
  <option value="01" selected="selected">January</option>
  <option value="02">February</option>
  <option value="03">March</option>
 
  <option value="04">April</option>
  <option value="05">May</option>
  <option value="06">June</option>
  <option value="07">July</option>
  <option value="08">August</option>
  <option value="09">September</option>
 
  <option value="10">October</option>
  <option value="11">November</option>
  <option value="12">December</option>
</select>
 

Please report any errors on this page to the Developer Documentation Forum.


Last Updated ( Saturday, 03 September 2005 )
 
< Prev   Next >