API15

API15:JHTMLGrid/id

From Joomla! Documentation

Revision as of 22:21, 22 March 2010 by Doxiki (talk | contribs) (New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JHTMLGrid/id}} ===Syntax...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

[Edit Descripton]

Template:Description:JHTMLGrid/id

Syntax

id($rowNum, $recId, $checkedOut=false, $name='cid')
Parameter Name Default Value Description
$rowNum The row index
$recId The record id
$checkedOut false
$name 'cid' The name of the form element

Returns

string

Defined in

libraries/joomla/html/html/grid.php

Importing

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

Source Body

function id( $rowNum, $recId, $checkedOut=false, $name='cid' )
{
        if ( $checkedOut ) {
                return '';
        } else {
                return '<input type="checkbox" id="cb'.$rowNum.'" name="'.$name.'[]" value="'.$recId.'" onclick="isChecked(this.checked);" />';
        }
}

[Edit See Also] Template:SeeAlso:JHTMLGrid/id

Examples

<CodeExamplesForm />