Class fvaswing.components.forms.FvCheckPollField

Description

Poll group ( using checkbox ) as form field.

Allow user to place a group of checkbox as unique field into form.

Choices must be added to field before adding field into a form object.

Example

   var poll : FvCheckPollField = new FvCheckPollField( "Your hobbies" );
   poll.addChoice( "basket-ball" );
   poll.addChoice( "football" );
   poll.addChoice( "actionscript" );   poll.addChoice( "nothing...too tired" );
 

Method Index

new FvCheckPollField()
addChoice(), clear(), getValue(), setRowAndColumn(), setValue()

Inherited from FvFormField

Constructor Detail

FvCheckPollField

public function FvCheckPollField(label:String, minSelection:Number)

Constructor.

Parameters

labelField's caption
minSelection( optional ) Minimum choice to be selected in order to validate the field.

Method Detail

setRowAndColumn

public function setRowAndColumn(rows:Number, columns:Number):Void

Defines row and column value for poll choices representation.

If not defined, uses row == choices list length and column == 1.

setValue

public function setValue(values:Array):Void

Sets selected field value.

getValue

public function getValue():Array

Returns selected field values list.

addChoice

public function addChoice(caption:String):Void

Adds new choice to poll.

Choices must be added to field before adding field into a form object.

Parameters

captionChoice's label

clear

public function clear():Void

Clears field value.