-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Ajout de la possibilité d'attribuer une 'value' a une checkbox.
Permet de récupérer des tableaux de donnée venant d'un groupe de checkbox
Problème : les Checkbox avec des noms identiques s'écrasent.
private value= "" ;
public function setValue($v = null)
{
$this->value = 'value="'.$v.'"';
}
/**
* @return string
*/
public function toString()
{
$str = '';
$str .= '<div class="control-group"><div class="controls">';
$str .= '<label class="checkbox">';
if ($this->checked == true)
$str .= '<input name="' . $this->name . '" checked="checked" type="checkbox" '.$this->value.' > ' . $this->label;
else
$str .= '<input name="' . $this->name . '" type="checkbox" '.$this->value.' > ' . $this->label;
$str .= '</label></div></div>';
return $str;
}
}Reactions are currently unavailable