Copy link to clipboard
Copied
There have been a lot of threads about this, but I've been unable to find an answer to the specific situation a colleague is facing.
We are simulating a mainframe system where the user enters multiple values, then presses enter. The client wants the simulation to replicate the system as closely as possible, and therefore we would like the user to Tab between the fields. After the last field is complete, the user should press Enter to move forward.
I can't get the text boxes to validate upon exit/lose focus...
In the screen shot below, the text boxes are highlighted for the sake of this thread. The yellow boxes have shortcuts of "Tab". The last text box (highlighted in purple) has a shortcut of "Enter". My hope was that, if a yellow box was not correct, when the user pressed tab, they'd receive the failure caption, but this has proved wholly unreliable. Sometimes it won't appear at all, sometimes the failure caption for a different yellow-shaded text box appears.
The text boxes don't seem to validate in any discernable order (not by the order they are in the timeline, not by reverse order in the timeline, not by the order they focus when the user presses tab). I've tried putting an advanced action on the last text box which should check each text box variable against its correct entry and only move forward if each are correct. This didn't work at all, it would still allow the user to move forward. I've tried setting it up so that each text box appears after the pause of the previous text box... I've tried setting the "on complete -> show -> next text box" (maybe I'm missing some key component of this method, 'cause I couldn't get the target to display on this at all)...
Thanks in advance- I could use any clues you have!
Copy link to clipboard
Copied
Hello,
I couldn't detect which version of CP you are using. If it is the latest one, version 5, you have to know that you cannot assign the same shortcut key (Tab) to different TEB's. I blogged about it a couple of weeks ago:
Lilybiri
Copy link to clipboard
Copied
Thanks for the link (I've subscribed now!)... We're using CS5.
How would we get multiple text boxes to validate on this one slide? It's almost like I want a "validate" action for the "focus lost" section...
Copy link to clipboard
Copied
Hello,
What I have been doing in the past, but then you will be forcing a certain sequence for filling in the TEB's, is making the Submit button for the first TEB transparent without text and putting it over the second TEB-field. In this way, when the user clicks on the second TEB (no TAB in that case) he submits his first entry, will eventually get an 'incorrect' message and it will be validated. Then put the Submit button for the second TEB over the third TEB-field etc.
But I do not know if this is an acceptable solution for you?
Lilybiri
Copy link to clipboard
Copied
Unfortunately, the customer is adamant that this follow the application as closely as possible- which requires tabbing between fields.
We're investigating having one TEB per slide, with advance on success... but that also dictates the TEBs be completed in a particular order, increases the number of slides, and is just darn clunky.
Is there a way to write an advanced action that would validate each text box, and display feedback for those that are not correct? Basically,
if TEB32 not equal to ABC, show Caption1
if TEB31 not equal to 123, show Caption2
and so on... The problem I encountered here is trying to execute multiple custom scripts on a single event...
Copy link to clipboard
Copied
Hello,
Checking all the entries in the TEB's with an advanced action is indeed possible, and showing appropriate Text Captions based on that check also. This Advanced action will have to be triggered (attached to) an event. Can you have an extra button on the slide to trigger this action? I'm prepared to help you out with the action if you provide me a detailed description, and allows me to use the explanation in an article or in a blog post. I already published several articles about advanced actions. Some are mentioned in my blog:
Lilybiri
Copy link to clipboard
Copied
I can write the advanced action which will check 1 TEB. Ideally, I'd like to have an advanced action which executes multiple custom scripts on one event. Is that possible, without writing code?
Is there a reason the event in this case can't be (either) focus lost or the shortcut on the last TEB? I plan to remove the failure captions on the TEBs, and would just put independent captions (not initially visible).
Copy link to clipboard
Copied
Hello,
I thought you wanted one Advanced action in which you will check the entries in all the TEB's (stored in user variables)? Do you think the 'focus lost' event is a good idea to trigger that since you are not sure that it will happen? And if you use the Submit from the 'last' TEB (that can be doubled as a shortcut), this means that you are imposing the sequence, not, you will have to be sure that this one will be the last TEB to be entered? Or do you want an advanced action that will be triggered by all 'focus lost' events and by all the Submit's?
What do you mean exactly by multiple custom scripts? Perhaps my lack of knowledge of English is puzzling me? You can trigger only one advanced action with an event, but this action can have a multitude of condtional actions, an unlimited sequence of standard actions and even combinations of standard and conditional actions (as I have been describing in the articles I did mention). If you are thinking about something else, please try to explain by giving more details.
Lilybiri
Copy link to clipboard
Copied
I am using Captivate 5 and have a similar need. I have three TEBs and a Submit button on one slide. I want to allow the user to enter text into each of the TEBs in any order and then click the Submit button to receive feedback (success or failure). The Submit button should trigger the validation of each TEB and display the feedback all at once. I'm thinking I can do this with Advanced Actions, but I'm not entirely sure how. Each TEB has one correct entry, so validation should be fairly straightforward. I have made sure to have a different shortcut action for each TEB. I'm not sure how to tie validation of TEB1, TEB2, and TEB3 to the click of the Submit button; I'm somewhat of a newbie to the more advanced capabilities of Captivate, but am motivated to learn.
Any suggestions or guidance is greatly appreciated.
Copy link to clipboard
Copied
Hello,
Will try to work this out as an example, and publish on my blog. I'l try to summarize your requests, and please let me know if this is OK:
An advanced conditional action with multiple decisions will be have to be used. I have been written some articles and blog postings about advanced actions. Maybe they could help you to start? This is the link to my blog post, when appropriate in the postings links to the articles (that are more detailed) are inserted.
http://lilybiri.posterous.com/
Lilybiri
Copy link to clipboard
Copied
Hi Lilybiri,
Thanks for the reply - I have started reviewing your tutorials and they are very helpful .
You are close with the requirements; I've made a few minor adjustments to clarify:
This is a knowledge check slide for elearning. The results are not scored or tracked. There are three questions on 1 slide and one TEB for each question. The user can answer any or all of the questions and then click a Submit button to get feedback (success or failure caption). There is one correct answer for each TEB. So when the user clicks the Submit button, they will see feedback next to each TEB based on what was entered.
If you have suggestions or can work up an example, it would be most appreciated. I will continue to work through the tutorials and see if I can get it to work as I really want to understand this and learn how to extend Captivate.
Thanks again!
Copy link to clipboard
Copied
Hello,
Finally found time to work this out. I could create a slide with 3 TEB's, that can only have one correct entry each. The slide has one Submit button, user can fill in the TEB's in whatever sequence he wants to do it. He can click on the Submit button after 1, 2 or 3 entries and will see which entries were correct/incorrect. For that purpose I used symbols but it is perfectly possible to replace the symbols by Text Captions. He can then continue to fill in and whenever he clicks on the Submit button everything is checked again. Only when the three entries are correct a second button Continue appears and can be used.
I added one feature: when an entry in a TEB is correct, this TEB is disabled to avoid that the user clicks again in it.
Could you work it out? I'll try to publish a blog post this weekend to explain the workflow.
Lilybiri
Copy link to clipboard
Copied
Hello Lilybiri!
Thank you for your guidance and suggestions.I have not yet worked this out, but I think I am close to a solution.
However, I am not a coder and have no formal experience with coding, so I am struggling with the logic part of my advanced actions. I'm sure I am overlooking something very obvious!
I can see that there is a great deal of potential with Advanced Actions in Captivate and I am inspired to learn more. I am still working my way through your tutorials and other resources I have discovered.
Here's what I have so far...I have the slide with three TEBs - each can have only one entry each and there is only one correct answer for each. The TEBs can be filled in in any order or left blank. The slide has one Submit button that, when clicked, evaluates the entry in the TEBs and marks them accordingly with either a Success image or a Failure image. Each TEB has a Success and Failure image associated with it and their visibility is turned off. I have used an advanced action that is tied to the Submit button that checks the entry in TEB1 and shows the Success image if it is correct; else the Failure image is displayed. This works great for TEB1, but I haven't yet worked out how to include TEB2 and TEB3. I have added a second slide following this to display the correct answers and this works correctly as well.
The part I'm still trying to work out is how to add multiple if then else statements to the advanced actions I have associated with the Submit button (so basically, on click of the button, check the value entered in TEB1, TEB2, and TEB3 and then display the appropriate Success or Failure image for each). I think this is where perhaps my logic is incorrect. Maybe doing this as three if then else statements combined in some way is the wrong approach.
SFNancy
Copy link to clipboard
Copied
Hello,
In my example, no shortcuts to move between TEB, only clicking possible (you cannot use twice the shortcut TAB in one slide).
Here are 2 out of 4 decisions for the conditional action to be triggered by the Submit button, with screenshots (will publish more details in my blog). The first three decisions (TEB1, TEB2, TEB3) are similar. The last (Counter) has to be the last, checks if the Continue button can appear.
Lilybiri
Copy link to clipboard
Copied
Hi all,
These images are so helpful - thank you! I am looking forward to Lilybiri's blog post. In the meantime, these examples are helping to trigger my thinking about this and I am going to try to work the rest of this out with the examples as a guide. The thread has been great, causing me to stretch my thinking and to think creatively how best to accomplish what I want with Captivate.
One thought that came to mind and you may be addressing this in your blog post, Lilybiri, but if not, maybe someone else has a suggestion - in the Correct Entries popup window for each TEB, if I have a correct entry set and I want that to be the only answer a user can enter in that particular TEB to be marked correct, is there a way to assign a variable to it (or reference it in some other way) rather than having to type that same correct entry in as a literal in the Advanced Actions window?
In my screenshot below, you can see what I have typed in the Correct Entries window. In the bottom part of the screenshot, you can then see what I typed into my If statement as a literal in the Advanced Actions window. I'm not sure if this is the right approach to this.
I'm sure I'm missing something obvious.
SFNancy
Copy link to clipboard
Copied
Hi,
You can assign the correct entry to a user variable, and then change the script accordingly. But I do wonder if this will be a timesaver? It would be if it was possible to put the variable directly in the HUD for the correct entries (the small dialog box that you show in your first screenshot) but that is not the case. That would make the whole thing much more flexible: you define the user variable and assign the correct entry to it, use this variable in the Correct entries HUD for the TEB and in the advanced actions. If the correct entry is different, you would only have to change the content of the user variable. I'm now thinking 'aloud', hope you do not mind. And I will file a feature request to ask for the ability to insert a user variable in the Correct Entries HUD.
In the present situation, I would only store the correct entry in a user variable (labeled here v_TB1Correct) if I needed it several times in the script, but that is not the case, it is only used once. Just tried it out, and those were the steps needed to be able to change the script statement to:
IF varTEB1 is equal to v_TB1Correct
Steps:
Alternative workflow:
Advantage: you only have to type the correct entry once, no possible issues with typos, agreed. But it is cumbersome.
Thanks for asking this, I will certainly add it to the blog post as an idea.
Lilybiri
Copy link to clipboard
Copied
Hello,
Finally I decided to write an article, will point to it in a blog post, but it was too technical to have everything in the blog.
Here is the link to the article, blog post will be published tomorrow:
Multiple Text Boxes - one Submit
Lilybiri
Copy link to clipboard
Copied
Thank you SO much, Lilybiri! This "conversation" has been helpful and I appreciate your guidance and expertise. When I initially set out to create my quiz slide, I didn't think this would be so extensive; you have helped me think differently about the challenge and approaches to solving it.
The article is excellent and I hope that others benefit from all of this.
Thank you again!
SFNancy
Copy link to clipboard
Copied
Thanks for your kind words! It is a win-win situation because your questions made me search for the proper solution and I have introduced a feature request to be able to insert variables in the correct entries HUD for TEB.
Could find time to publish some explanation on the blog too, here is the link:
One Submit button for Multiple Text Entry Boxes
Lilybiri
Copy link to clipboard
Copied
Lilybiri wrote:
Thanks for your kind words! It is a win-win situation because your questions made me search for the proper solution and I have introduced a feature request to be able to insert variables in the correct entries HUD for TEB.
Could find time to publish some explanation on the blog too, here is the link:
One Submit button for Multiple Text Entry Boxes
Lilybiri
Thanks, Lilybiri. That sounds like a valuable feature; I banged my head against the desk for quite some time trying to figure out the best way to reference the correct entries HUD . In the meantime, you have inspired me to learn more about ways to take advantage of Advanced Actions, variables, and the power of Captivate. This has been an enjoyable learning experience for me and I hope that the OP can benefit from all of this as well.
SFNancy
Copy link to clipboard
Copied
Ooh, I'm liking that!
I may have to shamelessly steal that technique for one of my own projects
Nice work Lieve
Copy link to clipboard
Copied
So I should have put a copyright on it?
You're welcome of course, let me know if you are having issues or seeing something that is not well explained!
Lilybiri
Copy link to clipboard
Copied
Lilybiri,
Thanks for such an excellent workflow! I am doing exactly this in my project & you have saved me a bunch of time...
I do have a few questions...
Why do the TEBs need to be configured to Validate User Input? Their input is being validated through the Advanced Action script, so it seems to me that this option could be disabled for the TEB objects. Is this still being used in some way? Is it necessary?
Also, if I remove the shortcut for my TEB - it forces a submit button to appear. I can't remove the submit button w/o having a shortcut action. Currently, I have the default shortcuts defined (Enter) for all my TEBs even though I know only one TEB will actually allow the shortcut. What does the shortcut do, exactly?
thanks again for all the help!
Monica
Copy link to clipboard
Copied
Hi Lilybiri,
I have been trying to implement the script but somehow I have gone wrong along the lines. Everytime I test the slide it keeps coming up with the ticks regardless whether I put the right information in.
I don't know what I am doing wrong
Would it be helpful if I attached the project?
Thank you,
Sal
Copy link to clipboard
Copied
It is not possible to attach a file. And since a while I have decided not to spend hours to debug files for users anymore for free. If you want to post screenshots of the advanced action, maybe I can detect some bugs?
And this is an old thread, are you using the same version as the original user?