Set inputbox text string to boolean

Norman Lim shared this question 1 year ago
Answered

How to set a text string from the inputbox to a boolean value of true. Thanks.

Comments (4)

photo
1

create a (boolean) defined as text=="true" being text the linked text to input box

photo
1

Thanks for the suggestion. I have tried it and it worked but it was not what I have hope to achieve.

I attached a screen grap of the steps that you have suggested.

If a user keyed in QR as the input text (ie AB=QR ), then I want to display the word "Correct".

If a user keyed in others text like CD (AB=CD), then I want to display the word "Try again".

Any idea how I can get this done.

Thanks.

photo
1

You can use https://wiki.geogebra.org/e... with two texts or make an object like this:


If(text1=="QR", "Correct", "Try Again")

photo
1

Thanks Michael. It works. That helps. However, how can I change the words "Correct" and "Try again" to Red colour and to set the positions of both text "Correct" and "Try Again" near to the inputbox. Thanks for the great help.

photo
© 2020 International GeoGebra Institute