function __construct($type, $value, $name) { if (is_null($value)) { $value = self::generateValue(); } parent::__construct($type, $value, $name); }
public function __construct(array $options = array()) { if (!function_exists('recaptcha_get_html')) { require Misc::getLibPath() . '/vendors/recaptcha/recaptchalib.php'; } parent::__construct($options); }
function __construct($value = '', $name = null) { $load = new Loader(); $this->date_picker = $load->customFormComponent('/widgets/datepicker'); $this->dropdown = Loader::formComponent('dropdown'); parent::__construct('hidden', $value, $name); }
public function __construct(array $options = array()) { if (!isset($options['bound'])) { $options['bound'] = false; } parent::__construct($options); }
/** * Create a selection input field. * * @option 'postback' if true it will submit the form when changed. * @option 'selected' forces key to be selected. */ public function __construct($key, $id, $name, $value, $label = null, array $attr = []) { /* if postback is enabled, add onchange which submits the forrm */ if ($this->popAttr('postback', $attr, $postback) && $postback) { $attr['onchange'] = 'this.form.submit();'; } $this->selected = $value; $this->popAttr('selected', $attr, $this->selected); $this->popAttr('options', $attr, $this->options); /* fill with empty options */ if ($this->options === null) { $this->options = new FormOptions(); } parent::__construct($key, $id, $name, $value, null, $label, $attr); /* FormInput sets value which select shouldn't have */ unset($this->attr['value']); }
function __construct($value = "Submit", $name = null) { parent::__construct('image', $value, $name); }
function __construct($value = "", $name = null) { parent::__construct('file', $value, $name); }
public function __construct($key, $id, $name, $value, $label, $attr) { parent::__construct($key, $id, $name, null, null, $label, $attr); $this->value = $value; }
public function __construct(array $list = array(), array $opt = array(), array $classes = array(), array $optClasses = array()) { $this->valuesList = $list; parent::__construct($opt, $classes); }
function __construct($value = '', $name = null) { parent::__construct('hidden', $value, $name); $this->setValidator(array(), array('callback' => 'Hello')); }
public function __construct($name) { parent::__construct(FormInputEnumeration::TYPE_TEXT, $name); $this->setRenderer(new TextFieldRenderer($this)); }
function __construct($value = '', $name = null) { parent::__construct('text', $value, $name); }
function __construct($value, $name = null) { parent::__construct('hidden', $value, $name); }
function __construct($value = "Reset", $name = null) { parent::__construct('reset', $value, $name); }
function __construct($value, $name = null) { parent::__construct('button', $value, $name); }
function __construct($value = '', $name = null) { parent::__construct('password', $value, $name); }
public function __construct($name) { parent::__construct(FormInputEnumeration::TYPE_CHECKBOX, $name); $this->setRenderer(new CheckboxRenderer($this)); }
function __construct($name, $options = null, $optionsId = null) { $this->options = $options; $this->optionsId = $optionsId; return parent::__construct($name); }
public function __construct($name, $label = '', &$oForm = Null) { parent::__construct($name, $label); $this->attrs['type'] = 'file'; $this->autoBound(False); if (substr($this->getName(), -2) == '[]') { $this->expect_array = True; } if (is_null($oForm) or !$oForm instanceof Form) { trigger_error('Une instance du formulaire doit être passée comme troisième paramètre au champ « ' . $name . ' ».', E_USER_ERROR); } //on adapte le form $this->form = $oForm; $this->form->setEnctype('multipart/form-data'); //définition des erreurs $this->setErrorText('invalid_ext', 'L\'extension du fichier n\'est pas valide. Extensions autorisées : %s'); $this->setErrorText('too_big', 'Le fichier est trop volumineux (%d octets max)'); $this->setErrorText('too_many_files', 'Trop de fichiers ont été soumis. Nombre maximal : %d'); $this->setErrorText('not_enough_files', 'Pas assez de fichiers ont été soumis. Nombre minimal : %d'); }
public function __construct($text, $label, $attr) { parent::__construct(false, false, false, null, null, $label, $attr); $this->text = $text; }