Explore the community Forums Lectora Lectora Questions & Answers Buttons/feedback that remain in pressed/activated state?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #412472 Score: 0
    Profile photo of jan waginski
    jan waginski
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @jwaginski

    Are there any buttons that can remain in a pressed state i.e. like a toggle that remains in state B until pressed again? I can do this using two different buttons and a separate checkmark indicator; however, when you navigate away from the page and back, everything reverts to its original state. This is true as well for question feedback that is set to appear on when a question processes immediately – the feedback disappears when you navigate away and back.

    • This topic was modified 3 weeks, 5 days ago by Profile photo of jan waginski jan waginski.
    #412476 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    251 pts
    @timk

    No. But you can use two buttons, one for each state that show/hide each other. jQuery UI has some real toggles if you’re familiar with it.

    #412478 Score: 0
    Profile photo of jan waginski
    jan waginski
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @jwaginski

    Hi Tim,

    Sorry, I modified my question.. I did as you say and that works fine but everything reverts when you navigate away from the page and return. Is there a way to make buttons/feedback persist?

    I wrote “when you navigate away from the page and back, everything reverts to its original state. This is true as well for question feedback that is set to appear when a question processes immediately – the feedback disappears when you navigate away and back.”

    #412482 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    251 pts
    @timk

    Alright, but you edited the question after I clicked “Reply” 😉

    Of course the HTML page is in its initial state whenever it’s opened. If you want to save changes you’ll need variables and repeat relevant actions. The question has a variable that will stay unchanged while the user is away from the page (unless you reset either test or question). To keep the feedback visible when a user returns to the page you’ll have to re-process the question with two actions:

    On: Show
    Action: Show
    Target: Incorrect Feedback

    If Question_0001 is not correct
    If Question_0001 is not empty

    On: Show
    Action: Show
    Target: Correct Feedback

    If Question_0001 is correct

    When a user comes to the page for the first time the question is empty and not correct, i.e. no feedback will be shown. But when a user returns, the question is not empty and either correct or not.

    #412789 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    13 pts
    @CarlFink

    A simple but arguably problematic way to have buttons keep their state when you change page: inherit the button from the Assignable Unit.

    #412903 Score: 0
    Profile photo of jan waginski
    jan waginski
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @jwaginski

    How can you inherit multiple buttons from the assignable unit when each button has either a 0 or 1 state?

    #413085 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    13 pts
    @CarlFink

    @jan, presumably you could hide the buttons on pages where they don’t apply and show them when they do. I’m not sure I understand the question, honestly.

    #413179 Score: 0
    Profile photo of jan waginski
    jan waginski
    Member
    beginner
    intermediate
    wise owl
    curious george
    contributor
    @jwaginski

    Thanks Carl. I think Tim’s solution for question feedback is ok as I can create that once for each question. I think I can do the same with the buttons.

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

You must be logged in to reply to this topic.