API15

JHTMLGrid/id: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m preparing for archive only
 
Line 57: Line 57:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=id
  category=id
  category=JHTMLGrid
  category=JHTMLGrid
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 00:51, 25 March 2017

[<! removed edit link to red link >]

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

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);" />';
        }
}

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

Examples

Code Examples