In ActivePresenter, is there a built-in setting or a recommended approach that allows me to detect whether all the blanks in a fill-in-the-blanks question have been filled without triggering the Submit event?
I want to check if all fields in the question are filled in before the learner clicks the Submit button.
Normally, if the learners do not fill in all the blanks and submit, ActivePresenter will consider it incomplete and will not change anything (score, attempt, etc.).
So it’s ok if users click submit without filling in all the blanks.
In case you do not want the Incomplete feedback layer to appear, just delete the On Incomplete event with the Show Incomplete Feedback Layer action.
Hi,
Thanks. I’m using a Fill in the Blanks question in ActivePresenter, and I would like to check — before the learner clicks the Submit button — whether all the blanks have been filled in.
Specifically, I want to detect this using JavaScript in an Execute JavaScript action (for example, to enable the Submit button only when all blanks are filled).
Is there a built-in method or recommended approach to check whether all blanks are filled without triggering the Submit event?
My mind goes to the idea of creating your own custom fill-in-the-blank slide using text entry boxes.
It would be easier to associate each blank with a variable for tracking purposes.
You might even wait to reveal the submit button until the blanks have input.
Something like the example below…? fillBlank.approj (876 KB)
First of all, thank you — creating a custom fill-in-the-blank interaction using text entry boxes, as you suggested, does make a lot of sense and gives more control.
That said, what I was mainly trying to figure out is this:
Is it possible to access the built-in Fill in the Blanks question type in ActivePresenter via JavaScript, and check whether its internal text entry fields are filled or not — without submitting the answer?
In other words, does ActivePresenter expose the internal input fields of its built-in question types (like Fill in the Blanks) in a way that we can interact with or read their values using JavaScript? Or is that kind of access restricted?
Yes, I understand you were looking at the built-in question slide. My apologies for not answering it directly.
After taking a quick look at that approach, it became clear to me that going a different route might prove a bit more successful and so I offered that up as an alternative that might help you to still achieve a desired outcome.
I cannot confirm or deny that capability with a built-in slide.
If it can be done - one of the staff experts would need to share that JavaScript.
I spent a very short amount of time on the sample I provided. If it will work for you - great - and if not - that’s OK too.
Thank you very much for taking the time to look into this and for offering the alternative approach — it’s definitely a practical workaround and I appreciate it.
I’d like to kindly ask if any of the ActivePresenter team members — perhaps @PhuongThuy_Le, @Hang, or @QuynhAnh_Vu — might be able to shed some light on whether this is technically possible, and if so, how we could go about accessing those input values using JavaScript.
Please find the attached project, which includes the JavaScript in the slide’s On Load event, for your reference. And here is the code for setting the number type:
var question = prez.object('question name');
var textInputs = $(question.node).find('input');
textInputs.attr({type: 'number'});
Hi @Hang,
Thank you so much!
I had been struggling with this for quite a while and couldn’t find a solution.
Your help and the example you shared were incredibly helpful.