Forum Discussion
Confirming Text in text entry fields.
Hi All,
I have some content where I would like learners to confirm text, eg
Enter email address (in one text field)
Confirm email address (in next text field)
I want both text fields to match, and only show a layer if the text fields do not match.
Please see the attachment for the trigger I am using.
I have played about with various settings, and the 'not equal to' will not show layer at all, however equal to will show layer for both correct and incorrect answers.
Any help is much appreciated.
- MichaelHinzeCommunity Member
Just by looking at the trigger screenshot, I can only guess but should this not be "When the object loses focus TextEntry6".
- SaeedChopdatCommunity Member
Hi Michael,
The text entry 3 is the text entry box I created, and the TextEntry6 is the trigger that storyline creates,
So both are linked to the same Text Entry box.
Hope that makes sense, lol
- WaltHamiltonSuper Hero
No, it doesn’t make sense. “TextEntry6” is not a trigger (triggers don’t have names), so it is probably a variable.
When you create the text entry boxes, you should name them something that is unambiguous, like “emailAddressEntry” and “emailAddressConfirmationEntry”. Personally, I also rename the default variables that SL attaches to them. It saves SO much time later when troubleshooting. Michael is correct, this sounds like a case of crossed expressions. With well-formed names, the trigger should read
”Show layer do not match when emailAddressConfirmationEntry loses focus if emailAddressVariable is not equal emailAddressConfirmation”
If that doesn’t work, then you have a deeper problem, and will need to attach the .story file (or at least the offending slide) here.
- SaeedChopdatCommunity Member
Hi sorry, I meant the variable.
I have attached the problem slide here. The 2 variables are- Text Entry 2 and Text Entry 3 (not sure how I can change the name for this.
The other issue I have is- Numeric Entry- IT won't show a layer if the field is left blank.
I have figured out how to show layer when text entry field is blank, but not sure what to do for Numeric entry field.
Just some background info. I work in a prison, so we don't have internet access, and I am trying to create a website simulation.
I really appreciate any support you can give.
Thanks,
- WaltHamiltonSuper Hero
In the attached sample, TextEntry5 and 6 are not being used, so I took them out of the triggers, and things started working.
As to the phone number, I would use a text variable, Then you can use "is not blank", or "< 1000000000 or greater than 9999999999" as your conditions, and it will show the error message if left blank.
As to comparing two entries (which I think was your original question), I'm suspicious of these two sets of triggers:
No matter what is entered, the second trigger makes them both = to HiddenPassword, so they always match. See the attached for a way they might work.
Notice that I’m in a real hurry, and did a very bad thing. I assigned the TextEntry5 and 6 variables to text entry boxes 2 and 3. Crossing those variables like that can make it very difficult to troubleshoot. You should fix them before you use them in production.
If you don't want to show the original password if they don't match, remove the trigger on the error message layer.
- SaeedChopdatCommunity Member
Hi Walt,
You truly are a hero!!!
Thanks for the heads up about renaming all the TextFields, as a newby I never realised the trouble it can cause.
This is my first project and I went big. LOL.
Thanks for the support.