05-30-2008, 09:55 AM
[eluser]abmcr[/eluser]
[quote author="abmcr" date="1212006615"]Another little feature for insert a small text after a field as in the attached image
into the plugin.php file set the getHTML function as
and in yml file set a line as
[/quote]
A little fix
[quote author="abmcr" date="1212006615"]Another little feature for insert a small text after a field as in the attached image
into the plugin.php file set the getHTML function as
Code:
function getHTML()
{
$html = $this->prefix;
if($this->getMessage($this->name))
$html .= '<div class="failure">'.$this->getMessage($this->name).'</div>';
$html .= '
<label for="'.$this->element_name.'">
'.$this->label.$this->required($this->name).'
</label>';
$html .= ' <input class="text" type="text" value="'.$this->value.'" name="'.$this->element_name.'" '.$this->getAttributes($this->attributes).'>
'.$this->params['extra_output'];
$html .= $this->suffix;
return $html;
}
Code:
textbox_test:
class: textBox
params:
extra_output: example of text after input
A little fix
Code:
function getHTML()
{
$html = $this->prefix;
if($this->getMessage($this->name))
$html .= '<div class="failure">'.$this->getMessage($this->name).'</div>';
$html .= '
<label for="'.$this->element_name.'">
'.$this->label.$this->required($this->name).'
</label>';
$html .= ' <input class="text" type="text" value="'.$this->value.'" name="'.$this->element_name.'" '.$this->getAttributes($this->attributes).'>
'.(isset($this->params['extra_output'])?$this->params['extra_output']:NULL);
$html .= $this->suffix;
return $html;
}