Copy link to clipboard
Copied
Is it possible to add several text fields for user inputs and validate them all together when the user has filled them all?
Copy link to clipboard
Copied
What do you mean by 'validate' exactly? Do you only want to test of the entries are corerct or do you need a score as well?
This is an old blog post I wrote many years ago, but it gives you a possible workflow:µ
One Submit button for Multiple Text Entry Boxes? - Captivate blog
Copy link to clipboard
Copied
The short answer is 'Yes'.
A side note:
I ran into this need a while back and, for me, all my puzzling went away as soon as I realized that the variables behind each of the text entry boxes were updated on every keystroke.
You see, I initially thought that since each text entry box came with a submit button that the learner would have to press submit in order to commit the value to the variable. Once I realized that was not the case, I could delete all the submit buttons and craft a homemade submit button with some advanced action or javascript behind it to validate them all at once.
Copy link to clipboard
Copied
Yes that is correct.
But you also need to remember that only a TEB that gets validated the normal way (with its own submit button action or auto-submit action) is going to give you an On Success score that you can get reported to the quiz. That's why Lieve was asking about whether or not you needed a score.
Copy link to clipboard
Copied
I was hoping it was possible to do the multiple validate without doing any coding since I am looking for an easy way to do the simulation and validation of a form that people with no coding skills can use for their learning material.
Copy link to clipboard
Copied
I didin't use real scripting in that blog post. However it is not very clear what you mean by 'validation'? Is there only one correct entry for each text entry box? Do you need scoring for the validated boxes?
Copy link to clipboard
Copied
I don´t need scoring for each text box. Just that the inputs are correct for the whole frame. But if some input is not correct the user must get a notification of where the error is.
Copy link to clipboard
Copied
Coding would not be a requirement, but I personally find it to be significantly faster to accomplish and easier to follow.
All that aside - It can be done with advanced actions.
On the click of the submit button, I have an IF variable = 'xxx' then show correct and hide wrong or hide correct and show wrong for each of the boxes. So correct1, correct2, correct3, etc.
I have made one such example where the user fills in several blanks after taking some measurements. They can check if they are correct.
They can fill in everything and check after they are done or they can check every time if they so choose.
They get some simple feedback as appropriate and can try again as often as they need to.
Copy link to clipboard
Copied
It used to be very easy with SWF output, if you can impose the sequence of the fields. I put the submit button of the previous TEB over the next TEB and made it invisible by taking out the labell and editing fill and stroke. When the user clicked the second TEB the default failure/success caption could pop up for the first TEB. However with HTML output the stacking of two interactive objects in the same location is not possible anymore. It could still work if you use using a shortcut key like TAB to replace the Submit button.
If you want the validation only to happen after all fields have been entered, you need an advanced action. I would have set it up differently than what StagPrime proposes (using states), but that is less important/