The Check Box lets users make a Boolean choice like yes / no, true / false. A Check Box consists of a small box and a descriptive caption. A check mark appears in the box when the option is selected. The absence of a check mark indicates that the option is not selected. Check Boxes are often used on forms or configuration screens for selecting options or turning program features on and off.

The Check Box object corresponds to the <input type="checkbox"> HTML tag.



To create a Check Box, use the mouse to draw a rectangle where you would like the object to appear. The Check Box properties can be accessed from the Properties Panel, allowing you to define the appearance and behaviour.



  • caption: use this property to add some text near to the Check Box.
  • id: use this property to set a unique name for your Check Box. It will allow you later to modify its properties programatically.
  • property-name: this is important if you want to send the data from a Form with a Check Box to a server. The server script will get the value associated to this property. (see later).
  • true-value: value to send to the server when the Check Box y checked.
  • false-value: value to send to the server when the Check Box y unchecked.
  • css-class: use the value "neocheckbox" to provide the checkbox with a modern stilized design.




In order to keep track of the status of a Check Box while your publication is running, you will need to assign the object a unique variable name. You may do this by modifying the Variable (to store button status) field on the Properties Panel. At runtime, the variable will contain the word “True” when the Check Box is selected; otherwise, the variable will be "False". You can use some simple Action Commands to detect if the box is checked. For example:


If "[CheckBox1]" "=" "True"

  do something...

Else

  do something else...

EndIf


You can select or unselect a Check Box at runtime like this:


SetVar "[CheckBox1]" "True"

SetVar "[CheckBox1]" "False"


If you send a Form with a Check Box to a server, the script on the server will get a value from your Check Box.
You can asign two diferent values to each Check Box usign the properties true-value and false-value. Only one of these values will be sent to the server: true-value if the Check Box is checked, or false-value otherwise.


For more information about sending data from a Form, click here.

For more information about variables and Actions, click here.


You may specify that the Check Box start out Checked or Unchecked by selecting the appropriate status for checked property option. When your publication starts, the Check Box will be initialized in this state.


Check Boxes supports the change event. Click the appropriate tab at the bottom of the Action Editor to create or edit Actions for the events you want to control. See Understanding Actions and Variables and Action Command Reference for a complete discussion of the Action Editor and Action Commands.










Created with the Personal Edition of HelpNDoc: Effortlessly Create High-Quality Documentation with a Help Authoring Tool