API16

JForm/getInput: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m preparing for archive only
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
Method to get the input control for a field.
Method to get the input control for a field.


<span class="editsection" style="font-size:76%;">
 
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>


<! removed transcluded page call, red link never existed >
<! removed transcluded page call, red link never existed >
Line 57: Line 55:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
<! removed transcluded page call, red link never existed >
<! removed transcluded page call, red link never existed >


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

Latest revision as of 01:41, 25 March 2017

Description

Method to get the input control for a field.


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

Syntax

getInput($name, $group= '_default', $formControl= '_default', $groupControl= '_default', $value=null)
Parameter Name Default Value Description
$name $name The field name.
$group '_default' $group The group the field is in.
$formControl '_default' $formControl The optional form control. Set to false to disable.
$groupControl '_default' $groupControl The optional group control. Set to false to disable.
$value null $value The optional value to render as the default for the field.

Returns

string The form field input control.

Defined in

libraries/joomla/form/form.php

Importing

jimport( 'joomla.form.form' );

Source Body

public function getInput($name, $group = '_default', $formControl = '_default', $groupControl = '_default', $value = null)
{
        // Render the field input.
        $field = $this->getField($name, $group, $formControl, $groupControl, $value);
        $input = $field->input;
        return $input;
}


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

Examples

Code Examples