ChoiceList deprecated::getChoices()

array getChoices() Returns the list of choices. Return Value array The choices with their indices as keys

ChoiceFormField::hasValue()

bool hasValue() Returns true if the field should be included in the submitted values. Return Value bool true if the field should be included in the submitted values, false otherwise

ChoiceFormField::setValue()

setValue(string $value) Sets the value of the field. Parameters string $value The value of the field Exceptions InvalidArgumentException When value type provided is not correct

ChoiceFormField::disableValidation()

ChoiceFormField disableValidation() Disables the internal validation of the field. Return Value ChoiceFormField

ChoiceFormField::select()

select(string $value) Sets the value of the field. Parameters string $value The value of the field

ChoiceFormField::isDisabled()

bool isDisabled() Check if the current selected option is disabled. Return Value bool

ChoiceFormField::isMultiple()

bool isMultiple() Returns true if the field accepts multiple values. Return Value bool true if the field accepts multiple values, false otherwise

ChoiceFormField::getType()

string getType() Returns the type of the choice field (radio, select, or checkbox). Return Value string The type

ChoiceFormField::addChoice()

addChoice(DOMElement $node) Adds a choice to the current ones. This method should only be used internally. Parameters DOMElement $node Exceptions LogicException When choice provided is not multiple nor radio

ChoiceFormField

class ChoiceFormField extends FormField ChoiceFormField represents a choice form field. It is constructed from a HTML select tag, or a HTML checkbox, or radio inputs. Methods __construct(DOMElement $node) Constructor. from FormField string getName() Returns the name of the field. from FormField string|array getValue() Gets the value of the field. from FormField setValue(string $value) Sets the value of the field. bool hasValue() Returns true if the field should be includ