• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Display text entered in text entry box

Explorer ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

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.

Views

628

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 10, 2023 Mar 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. Bew
...

Votes

Translate

Translate
Community Expert ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

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.

 

mysk83_0-1678434819643.pngexpand image

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 10, 2023 Mar 10, 2023

Copy link to clipboard

Copied

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 10, 2023 Mar 10, 2023

Copy link to clipboard

Copied

Thank you. I will be using or to add different variations of the word.

Could I also use the $$v_entry$ to display the text in the state?
Something like

Your answer "$$v_entry$$" are good. Another correct answer would also be.......

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 10, 2023 Mar 10, 2023

Copy link to clipboard

Copied

LATEST

Of course, but please ALWAYS use the X-button in the Character part to insert the variable (you typed it and missed the last $) because you will need to increase the length displayed. Maybe arrange to have the variable value in a separate paragraph.

I prefer using states, but you can also use Show for a hidden text container of course. Reason of my preference:

https://blog.lilybiri.com/tip-3-show-slash-hide-or-multistate-object-advanced-slash-shared-actions

 

As courtesy to other users looking for a similar solution, please mark the helpful answer as being correct.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources