I would like to perform an action when a checkbox is selected/unselected. Is there some way to do this? Thanks

asked 27 Feb '13, 15:50

danish's gravatar image

danish
1393940
accept rate: 0%


It is not possible to bind to that event. Could you provide us with some more information about what you are trying to accomplish?

link

answered 28 Feb '13, 10:33

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Say I have a pane with a bunch of check boxes. I want to disable the next button until the user selects one or more of the checkboxes. There are other things, like I'd like to have a "select all" checkbox/button, that would allow the user to select all options with one click.

(04 Mar '13, 14:11) danish

It is not possible to implement that dynamic behaviour but to prevent the user from continuing you could add the below to the validationActionList:

<validationActionList>
   <setInstallerVariable name="none_selected" value="1"/>
   <foreach variables="checkbox" values="checkbox1 checkbox2 checkbox3 checkbo4 checkbox5 checkbox6">
       <actionList>
             <setInstallerVariable name="none_selected" value="0">
                   <ruleList>
                         <isTrue value="${${checkbox}}"/>
                   </ruleList>
             </setInstallerVariable>
       </actionList>
   </foreach>
   <throwError text="Please select at least one checkbox">
       <ruleList>
           <isTrue value="${none_selected}"/>
       </ruleList>
    </throwError>
</validationActionList>
link

answered 07 Mar '13, 17:03

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×10
×5

Asked: 27 Feb '13, 15:50

Seen: 1,009 times

Last updated: 07 Mar '13, 17:03