function FormFileUploader($fieldId, $field_options) { parent::FormField($fieldId, $field_options); foreach ($field_options as $attribute => $value) { $attribute = strtolower($attribute); switch ($attribute) { case 'size': $this->field_size = $value; break; default: $this->throw_error(sprintf('Unsupported option %s with field ' . __CLASS__, $attribute), E_USER_NOTICE); } } }
function FormRadioChoice() { $fieldId = func_get_arg(0); $field_options = func_get_arg(1); parent::FormField($fieldId, $field_options); foreach ($field_options as $attribute => $value) { $this->throw_error(sprintf('Unsupported option %s with field ' . __CLASS__, strtolower($attribute)), E_USER_NOTICE); } $nbr_arg = func_num_args() - 1; for ($i = 2; $i <= $nbr_arg; $i++) { $option = func_get_arg($i); $this->add_errors($option->get_errors()); $this->field_options[] = $option; } }
function FormRadioChoiceOption($field_options) { parent::FormField('', $field_options); foreach ($field_options as $attribute => $value) { $attribute = strtolower($attribute); switch ($attribute) { case 'optiontitle': $this->option_title = $value; break; case 'checked': $this->option_checked = $value; break; default: $this->throw_error(sprintf('Unsupported option %s with field option ' . __CLASS__, $attribute), E_USER_NOTICE); } } }
function FormSelect() { $fieldId = func_get_arg(0); $field_options = func_get_arg(1); parent::FormField($fieldId, $field_options); foreach ($field_options as $attribute => $value) { $attribute = strtolower($attribute); switch ($attribute) { case 'multiple': $this->field_multiple = $value; break; default: $this->throw_error(sprintf('Unsupported option %s with field option ' . __CLASS__, $attribute), E_USER_NOTICE); } } $nbr_arg = func_num_args() - 1; for ($i = 2; $i <= $nbr_arg; $i++) { $option = func_get_arg($i); $this->add_errors($option->get_errors()); $this->field_options[] = $option; } }
function FormTextarea($fieldId, $fieldOptions) { parent::FormField($fieldId, $fieldOptions); foreach ($fieldOptions as $attribute => $value) { $attribute = strtolower($attribute); switch ($attribute) { case 'rows': $this->field_rows = $value; break; case 'cols': $this->field_cols = $value; break; case 'editor': $this->field_editor = $value; break; case 'forbiddentags': $this->field_forbidden_tags = $value; break; default: $this->throw_error(sprintf('Unsupported option %s with field ' . __CLASS__, $attribute), E_USER_NOTICE); } } }
function FormHiddenField($fieldId, $field_options) { parent::FormField($fieldId, $field_options); }