Text entry fields and validation
Dec 01, 2016
Hi,
I'm not very familiar with the text entry fields. I want users to type an amount in a field (eg 50.00). If they enter the amount correctly, there would be a trigger to send them to the next layer or if necessary, the next slide).
I've added a text entry box, but when I go to the first layer, the amount is already in the field. I only see one default variable associated to the text entry box that says Set TextEntry equal to the typed value when the user loses focus.
Is there a way to make them enter the value and have it validated so they can move forward? What does "user loses focus" mean?
Thanks
Natasha
8 Replies
Hi Natasha
are you using a quiz type slide for this interaction or building it yourself? Might be easier for someone to help if you can upload your .story file. Just use the grey 'add attachment' button at the bottom of the post.
I'm not using a quiz type interaction. I was hoping just to add it as a button. I'm faking an excel calculator (no I don't want it to do the calculations). I just have an image background and I want the user to enter the correct amount in the field. It doesn't have to calculate just validate the content. I've used other tools where this is quite easy to add---which is why I'm wondering if I'm missing something.
I can't upload anything unfortunately. Banking fire wall--nothing in, nothing out.
Hi Natasha
'lose focus' means the user has to click outside the text entry box for SL to validate what has been entered.
That could be clicking 'next button' or a custom button 'I'm done' or just clicking somewhere on the screen
Thanks Wendy.
So why is the value automatically displayed as soon as I click on the layer? Am I only supposed to put in the correct answer in the variable and not on the box that appears in the screen (when I'm developing)
Hi Natasha
this example may help - I've assumed a few things without seeing how you handle an incorrect answer I am showing a layer.
Correct - when you set the variable up the default field should be blank.
Look t how my variable is set up.
Thanks for explaining the "lose focus". It's not as straight forward as I'd like it to work but I think I've got it now. I learnt a new skill today. Thanks Wendy.
Glad you got it sorted Natasha - good luck with your project!
This discussion is closed. You can start a new discussion or contact Articulate Support.