Skip to main content
Inspiring
March 9, 2023
Answered

Display text entered in text entry box

  • March 9, 2023
  • 1 reply
  • 816 views

Hi

I have a course where the user must answer a question by typing in an answer containing certain words. When the feedback for correct answers show I would like to display what the user have typed in.

Example: Your answer "the users answer" is verry good. The answer "........." would also have been correct.

I would like this to show up inside a text box that is triggered to show if the words are in the answer using advanced action.

    This topic has been closed for replies.
    Correct answer Lilybiri

    Long time ago I wrote a blog post about creating such a condition testing if a variable contains some words, but it was still in the SWF period, which means that the example output is not displaying anymore. Here is the link:

    https://blog.lilybiri.com/custom-short-answer-question

     

    I try to explain a possible workflow in short:

    • Create a multistate shape SS_Output with two states: first is empty, second has the variable associated with the Text Entry Box, which I will rename here to v_entry. Beware: when inserting the variable using the X button in the Character part of the shape, make sure to increase its length, because the default lenght of 50 will not be sufficient.
    • I would prefer a Scrolling Text interaction over a TEB, but if you want a TEB, please make sure to activate the scroll bar and to resize the TEB. 
    • Advantage of the TEB is that it is an interactive object, which means that the Submit button (or its shortcut key) can trigger a Success action. TEB is not validated in this case.
    • The Success event should trigger a conditional advanced (or shared) action, like this:
      IF v_entry contains kaffe AND           not sure if it is AND or OR?
           
      v_entry contains og
      Go to Next State SS_Output

     

    1 reply

    Lilybiri
    Brainiac
    March 9, 2023

    Bit vague. Did you use one Text Entry Box or multiple TEBs? Each TEB has an associated variable, and you could use the 'contain' operator to find some words in the variable. Please give some more details, I have lot of examples on my blog about using and displaying variables. I may be able to help but I need more details. Why not post screenshots of the slide and explain based on that screenshot.

     

    mysk83Author
    Inspiring
    March 10, 2023

    I will try to explain a bit more 🙂 But the concept is easy. 
    The user types in a text in the TEB
    I would like to display that text in another textbox that pops up if the user include certain words in the answer.

     

     

    Lilybiri
    LilybiriCorrect answer
    Brainiac
    March 10, 2023

    Long time ago I wrote a blog post about creating such a condition testing if a variable contains some words, but it was still in the SWF period, which means that the example output is not displaying anymore. Here is the link:

    https://blog.lilybiri.com/custom-short-answer-question

     

    I try to explain a possible workflow in short:

    • Create a multistate shape SS_Output with two states: first is empty, second has the variable associated with the Text Entry Box, which I will rename here to v_entry. Beware: when inserting the variable using the X button in the Character part of the shape, make sure to increase its length, because the default lenght of 50 will not be sufficient.
    • I would prefer a Scrolling Text interaction over a TEB, but if you want a TEB, please make sure to activate the scroll bar and to resize the TEB. 
    • Advantage of the TEB is that it is an interactive object, which means that the Submit button (or its shortcut key) can trigger a Success action. TEB is not validated in this case.
    • The Success event should trigger a conditional advanced (or shared) action, like this:
      IF v_entry contains kaffe AND           not sure if it is AND or OR?
           
      v_entry contains og
      Go to Next State SS_Output