Get text box value to variable

insaman Community Member Posts: 9

I have a test where each question have two feedbacks, one for correct and one for incorrect answer.

When the user is done with the test I'm want all feedbacks from the incorrect answers collected together with the question string on a summary page.

But I can't manage to get the string from my feedback text box to a variable. I've tried with creating a new variable that I change conent on and I'm then adding the text box name to my feedback variable, but no dice...

Is there anybody here that have tried something simular and got it to work?


/ Kent


  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    Hej-hej! :)

    I don't think you can (easily*) get contents of a textbox into a variable. But you can easily get the contents of a variable into a textbox. So you should create a variable called e.g. "Negative_Feedback_1" and then add an action to your hidden feedback textbox: "On Show -> Change Contents -> This textbox -> To Variable Negative_Feedback_1".

    In other words, you keep your feedbacks in variables from the very beginning and change textbox contents when you need it. And on your grand feedback page, you simply use the feedback texts from the variables.

    * Or you can use JavaScript to grab the textbox contents and put it into a variable.

    Let me know if it made sense :)