Explore the community Forums Lectora Lectora Questions & Answers Display button when checkboxes are checked

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #369418 Score: 0
    Profile photo of Pawel Kulpinski
    Pawel Kulpinski
    Member
    beginner
    intermediate
    curious george
    wise owl
    friend finder
    2 pts
    @pkulpinski3055

    Hi, I have a problem. On of my title’s pages I have two checkboxes and a button. The button is initialy hidden and I would like to display it when both checkboxes are checked. I tried to do it with variables, but it doesn’t seem to work. Is there any way to display initialy hidden button when both checkboxes are checked?

    #369422 Score: 1
    Profile photo of Stan Miller
    Stan Miller
    Member
    beginner
    intermediate
    LUC16 Attendee
    wise owl
    contributor
    curious george
    friend finder
    LUC17 Attendee
    39 pts
    @smiller7502

    Sure thing, Pawel!

    Each check box has an associated variable, by default called Checbox_NNNN (e.g. Checkbox_0001). When the box is checked, the value of that variable is on. So add an action to your first checkbox to show the button if Checkbox_0001 is on and Checkbox_0002 is on, and then copy the action to the second checkbox.

    See attached for a working sample.

    This post has received 1 vote up.
    #369427 Score: 0
    Profile photo of Pawel Kulpinski
    Pawel Kulpinski
    Member
    beginner
    intermediate
    curious george
    wise owl
    friend finder
    2 pts
    @pkulpinski3055

    Thank you very, very much.

    I didn’t know about the checkboxes values, so I tried to set them equal to 1 when checked and show button if variables checkbox0001 and 0002 are equal to 1, but it didn’t work. And the solution is much simpler, as I see.

     

    Thank you once again – for the explanation and for the example!

    #369429 Score: 0
    Profile photo of Stan Miller
    Stan Miller
    Member
    beginner
    intermediate
    LUC16 Attendee
    wise owl
    contributor
    curious george
    friend finder
    LUC17 Attendee
    39 pts
    @smiller7502

    Testing for 1 was my first try too! When that didn’t work I added a “Display Message” action to show me the value of the variable. FYI, the value is null when the box is not checked.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.