Drag-and-drop activities are one of the most engaging ways to test learner knowledge in Articulate Storyline 360. They encourage interaction, problem-solving and critical thinking.
By default, however, Storyline allows learners to click the Submit button immediately, even if they haven’t interacted with the drag-and-drop items. This can result in learners skipping tasks, lowering engagement and impacting learning outcomes.
Click Preview to see Articulate Storyline 360: Using JavaScript to control the Submit after Learner Interaction in a Sequence Drag-and-Drop Activity.
In this step-by-step tutorial, you’ll learn how to disable the Submit button at the start and only enable it after learners interact with the drag-and-drop items using a combination of Storyline triggers, variables and JavaScript.
About Articulate Storyline 360?
Articulate Storyline 360 is a leading e-learning authoring tool designed to help designers and organizations create interactive, engaging online training. With its intuitive interface and powerful features, Storyline 360 allows you to build responsive courses that work seamlessly across devices.
Key capabilities include:
✔ Drag-and-drop interactions to make learning engaging
✔ Quizzes and assessments to track learner progress
✔ Animations and transitions for dynamic storytelling
✔ Screen recording and simulations to teach software skills
✔ Accessibility features to make learning inclusive
✔ Integration with the Articulate 360 suite, including Rise 360 and Content Library
Whether you’re designing corporate training, compliance modules, or educational content, Storyline 360 makes it easy to combine creativity with functionality to deliver professional e-learning experiences.
Why Control the Submit Button?
Allowing learners to submit too early has drawbacks:
✔ Incomplete participation – Learners may skip the activity entirely.
✔ Lower retention – Without hands-on interaction, learning effectiveness decreases.
✔ Disrupted flow – The activity feels less structured and purposeful.
By enabling the Submit button only after interaction, you ensure that learners engage fully before moving on. This creates a smoother, more professional course experience.
Step-by-Step Guide
Here’s how to build this functionality in Articulate Storyline 360:
Step 1: Set Up the Drag-and-Drop Interaction
✔ Open your project in Storyline 360.
✔ Here we have Inserted a slide with three draggable items (you can use any number of items for your activity).
Tip: Keep your design simple so learners can focus on the interaction itself.
Step 2: Insert a Custom Submit Button
✔ Draw a shape (rectangle, rounded rectangle, or custom shape).
✔ Label it “Submit.”
✔ Place it where you’d like on the slide (usually at the bottom right).
✔ Change its initial state to Disabled.
To check: Preview the slide. The Submit button should appear but remain unclickable.
Step 3: Create a Control Variable
✔ Go to the Variables panel.
✔ Add a new variable:
- Name: ‘submitEnabled’
- Type: True/False
- Default Value: False
This variable will control when the Submit button becomes active.
Step 4: Add JavaScript to Initialize the Variable
✔ Add a new trigger:
- Action: Execute JavaScript
- When: Timeline starts
- Object: This slide
✔ Paste the following JavaScript code:
const container = document.querySelector(‘.sequence-ctrl-scroll-area-contents’);
const checkInterval = setInterval(() => {
const draggableItems = document.querySelectorAll(‘.sequence-ctrl-drag-container’);
let anyOutside = false;
draggableItems.forEach(item => {
if (!container.contains(item)) {
anyOutside = true;
}
});
if (anyOutside) {
clearInterval(checkInterval);
console.log(‘Item moved out of container. Enabling Submit.’);
setVar(‘submitEnabled’, true);
}
}, 300);
This ensures that the ‘submitEnabled’ variable is set to false when the slide loads, keeping the Submit button disabled.
Step 5: Enable the Submit Button Dynamically
Finally, connect the variable to the Submit button.
✔ Select the Submit button.
✔ Add a trigger:
- Action: Change state of [Submit button]
- To state: Normal
- When: Variable changes
- Variable: ‘submitEnabled‘
- Condition: ‘submitEnabled’ = True
Now, when a learner interacts with the drag-and-drop activity, the Submit button will become enabled.
Step 6: Test the Interaction
Finally, connect the variable to the Submit button.
✔ Preview the course.
✔ At the start, the Submit button should be disabled.
✔ Drag one item onto its target.
✔ The Submit button should change to enabled (Normal state).
✔ Continue testing with other items to confirm functionality.
Note: If the button does not enable, double-check your triggers and make sure the variable is linked correctly.
Best Practices
✔ Provide visual feedback – For example, change the Submit button color once enabled so learners notice it’s active.
✔ Use descriptive variable names – e.g., `submitEnabled` instead of `var1` to avoid confusion.
✔ Test in both Preview and Published mode – Sometimes JavaScript behaves differently outside of Preview.
✔ Keep interactions consistent – If you use this method in one activity, apply it throughout your course for a professional experience.
Looking for a Learning Management System (LMS) Solution?
We offer Learning Management System (LMS) solutions tailored to your organization’s unique training, compliance, and performance management goals.
Whether you’re a corporate organization, educational institution, or non-profit, we’re here to help you deliver engaging, scalable, and measurable learning experiences.
Summary
By combining variables, triggers and a simple JavaScript snippet, you can fully control when the Submit button becomes available in an Articulate Storyline 360 drag-and-drop activity.
This technique ensures learners engage with the interaction before moving forward, preventing skipped steps and improving the overall effectiveness of your e-learning course.
Use this approach in your next project to create a structured, interactive and professional learning experience.
Frequently Asked Questions (FAQs)
Q1. What is a drag-and-drop interaction in Articulate Storyline 360?
A. A drag-and-drop interaction in Storyline 360 is a type of activity where learners drag objects to designated targets. It’s commonly used to test knowledge, reinforce concepts and make e-learning more interactive.
Q2. Where can I add the JavaScript to control the Submit button in Storyline 360?
A. You can add the JavaScript through a trigger that executes when the timeline starts on the slide. The script initializes the variable and helps Storyline recognize when to enable the Submit button.
Q3. Why use JavaScript in Articulate Storyline 360?
A. JavaScript allows developers to extend Storyline’s built-in features. In this case, it helps control variables and conditions so that the Submit button activates only when learners interact with drag-and-drop items.
Q4. How can I make my drag-and-drop interactions more engaging?
A. Beyond controlling the Submit button, you can:
✔ Add custom feedback layers for correct/incorrect attempts
✔ Use animations when objects snap to targets
✔ Include gamification elements like points or badges
✔ Provide hints or tooltips for guidance
Q5. Where do I find the variable settings in Storyline 360?
A. You can create and manage variables in the Variables panel, accessible from the top Storyline ribbon. Here, you can define True/False, Number, or Text variables to track learner progress.