API15

Difference between revisions of "JHTMLSelect/booleanlist"

From Joomla! Documentation

< API15:JHTMLSelect
(New page: ===Description=== Generates a yes/no radio list <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</n...)
 
m (removing red link to edit, no existant pages)
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JHTMLSelect/booleanlist|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JHTMLSelect/booleanlist}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 63: Line 63:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JHTMLSelect/booleanlist|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JHTMLSelect/booleanlist}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 78: Line 78:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API15]]

Revision as of 13:30, 12 May 2013

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Generates a yes/no radio list

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

booleanlist($name, $attribs=null, $selected=null, $yes='yes', $no='no', $id=false)
Parameter Name Default Value Description
$name The value of the HTML name attribute
$attribs null Additional HTML attributes for the <select> tag
$selected null The key that is selected
$yes 'yes'
$no 'no'
$id false

Returns[edit]

string HTML for the radio list

Defined in[edit]

libraries/joomla/html/html/select.php

Importing[edit]

jimport( 'joomla.html.html.select' );

Source Body[edit]

function booleanlist( $name, $attribs = null, $selected = null, $yes='yes', $no='no', $id=false )
{
        $arr = array(
                JHTML::_('select.option',  '0', JText::_( $no ) ),
                JHTML::_('select.option',  '1', JText::_( $yes ) )
        );
        return JHTML::_('select.radiolist',  $arr, $name, $attribs, 'value', 'text', (int) $selected, $id );
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />