Custom eLearning and Digital Training Solutions Provider
  • Home
  • eLearning Services
    • Custom Elearning Solutions
    • Convert PowerPoint to eLearning
    • Rapid eLearning Development
    • Translation and Localization
    • Flash To HTML5 Conversion
    • Legacy Content Conversion
    • Mobile Learning
    • Gamified Learning Solutions
    • Blended Learning Solutions
  • Software Development
    • Learning Management System
    • Workforce Management System
    • Human Resource Management System
    • Bug Tracker Software
    • Custom Software Development
  • Contact Us
  • Blog
  • Search
  • Menu Menu
  • 0Shopping Cart
  • Home
  • eLearning Services
    • Custom Elearning Solutions
    • Convert PowerPoint to eLearning
    • Rapid eLearning Development
    • Translation and Localization
    • Flash To HTML5 Conversion
    • Legacy Content Conversion
    • Mobile Learning
    • Gamified Learning Solutions
    • Blended Learning Solutions
  • Software Development
    • Learning Management System
    • Workforce Management System
    • Human Resource Management System
    • Bug Tracker Software
    • Custom Software Development
  • Contact Us
  • Blog

How to Validate Learner Input in Storyline 360 Course Using JavaScript

When creating interactive eLearning courses in Articulate Storyline 360, text entry fields allow learners to type their responses during quizzes, assessments, or scenario-based activities. However, Storyline’s default functionality cannot always validate open-ended responses based on specific keywords.

To overcome this limitation, we use JavaScript in Storyline 360 to check whether a learner’s response includes required keywords and then trigger feedback automatically.

Click Preview to see how to Validate Learner Input in Storyline 360 Course Using JavaScript

Preview

In this article, you will learn how to validate keywords in a Storyline 360 text entry interaction using JavaScript.

Why Use Keyword Validation in Storyline 360 Courses?

Keyword validation helps designers evaluate open-ended responses more effectively.

Some benefits include:

1. Checking if learners include important concepts in their answers
2. Validating text responses in scenario-based learning
3. Providing automated feedback based on learner input
4. Creating more interactive and realistic learning experiences

This approach is commonly used in compliance training, safety training, and problem-solving activities.

Create smarter, more interactive courses with our Custom eLearning services.

Contact us

Step-by-Step Guide to Checking Keywords in Storyline 360 course

Step 1: Open Your Project in Articulate Storyline 360

Begin by launching Articulate Storyline 360 and opening the project where you want to add keyword validation in a text entry field.

Navigate to the slide containing the text entry interaction. This slide will allow learners to type their responses.

The goal is to capture the learner’s input and use JavaScript validation to determine whether the response includes specific keywords.

Step 2: Create a Variable

Before implementing the JavaScript logic, you need to create a variable that will track whether the learner’s response contains the required keywords.

In Slide View, locate the Variables button next to the Group option.

Click Variables to open the Variables window.

When the window appears:
● Click the plus icon to create a new variable.
●
Name the variable answer.
● Set the Type to True/False.
●
Set the Default Value to False.
● Click OK.

This True/False variable in Storyline 360 will later be updated using JavaScript when the correct keywords are detected.

Variables are an essential part of Storyline 360 triggers and allow developers to control interactions, feedback layers, and other learning elements.

Step 3: Create a Trigger to Execute JavaScript

The next step is to create a trigger in Storyline that executes JavaScript when the learner submits their response.

Open the Triggers panel and click Create a New Trigger.

Configure the trigger as follows:
● Action: Execute JavaScript
●
When: User clicks
● Object: Submit button

This Execute JavaScript trigger in Storyline 360 allows the system to run custom scripting whenever the learner clicks the Submit button.

Triggers play a key role in interactive eLearning development, enabling developers to connect learner actions with specific responses or system behaviors.

Step 4: Open the JavaScript Editor

After selecting Execute JavaScript, the JavaScript editor will open automatically.

In this editor, you can write or paste the script that will check the learner’s input and determine whether the required keywords are present.

This script uses the Storyline JavaScript API, which includes functions such as:
●
player.GetVar() – retrieves the value of a Storyline variable
● player.SetVar() – updates a Storyline variable

These functions enable communication between Storyline variables and JavaScript logic.

Paste your JavaScript code into the editor and click OK.

var answer = getVar(“TextEntry”);
var words = [“emails”, “websites”];
var containsWords = words.every(word => new RegExp(`\\b${word}\\b`,’i’).test(answer));
setVar(“answer”,containsWords);

Make sure that:
● The keywords you want to check are defined in the script.
● The script references the variable you created earlier (answer).

This ensures that the variable updates when the learner’s response includes the specified keywords.

Step 5: Add Feedback Layers

Once the JavaScript logic is in place, the next step is to create a feedback layer.

Layers allow you to display additional information or responses based on learner actions.

Create a new layer called Answer.

On this layer, you can display:

● The correct answer
● Feedback explaining the response
● Additional guidance for the learner

Feedback layers are commonly used in Storyline quiz validation and scenario-based training modules.

Step 6: Create a Trigger to Show the Feedback Layer

Now you need to create another trigger that displays the Answer layer when the variable changes.

On the Base Layer, create a new trigger with the following settings:
● Action: Show Layer
● Layer: Answer
● When: Variable changes
● Variable: Answer

This Storyline trigger condition ensures that the feedback layer appears when the variable answer changes from False to True.

This type of variable-based trigger in Storyline is commonly used in custom eLearning interactions.

Step 7: Preview and Test the Interaction

After configuring the triggers and JavaScript code, it is important to test the interaction.

Click Preview to run the slide.

Type a response in the text entry field and click the Submit button.

Two outcomes are possible:

● If the learner’s response does not contain the keywords

    • The answer variable remains False.
    • Since the variable does not change, the feedback layer will not appear.
    • This ensures that learners must include the correct keywords before proceeding.

● If the learner’s response includes the keywords

    • The JavaScript code updates the answer variable to True.
    • When the variable changes, the Answer layer automatically appears, providing feedback or the correct solution.
    • This approach demonstrates how keyword detection in Storyline 360 can be implemented using JavaScript.

Access free Articulate Storyline 360 training and start creating interactive eLearning experiences today.

Start Learning

Frequently Asked Questions (FAQs)

Can Storyline 360 validate open-text answers?

Yes, by using JavaScript you can detect keywords in learner responses and trigger feedback layers.

What is JavaScript used for in Storyline?

JavaScript extends Storyline functionality by enabling advanced interactions such as keyword validation, timers, and custom scoring.

Why use JavaScript in Storyline 360?

JavaScript enables advanced features such as keyword detection, custom scoring, and dynamic feedback.

Looking for an eLearning partner?

We create custom eLearning solutions that combine interactive design, smooth performance, and engaging learning experiences to deliver real training impact.

Know More

ARTICULATE STORYLINE POSTS

  • step-by-step guide to customize quiz feedback colors in rise 360
    How to Customize Correct and Incorrect Answers Feedback Colors in Articulate Rise 360June 27, 2025 - 4:40 PM
  • removing labels and numbers from process blocks in articulate rise 360
    How to Remove Labels and Numbers from Process Blocks in Articulate Rise 360June 20, 2025 - 3:07 PM
  • easy-online-course-creation-ispring-suite-swift-elearning-services
    Create Online Courses with Ease Using iSpring Suite – The All-in-One eLearning Authoring Tool for PowerPointJune 16, 2025 - 11:18 AM
  • how to adjust padding in articulate rise 360 content blocks for custom e-learning
    How to Adjust Padding in Articulate Rise 360 Content Blocks for Custom E-LearningJune 9, 2025 - 5:23 PM
  • swift elearning services focuses on crafting custom elearning courses that enhance digital learning experiences.
    How to Use Snapshots to Recover Deleted Lessons in Articulate Rise 360April 23, 2025 - 3:58 PM
  • swift elearning services provides articulate 360 localization, offering tailored elearning solutions that adapt your content for global audiences.
    Articulate 360 Localization: Create, Translate, and Manage Training with EaseApril 17, 2025 - 11:24 AM
  • custom elearning solution with jump-to-time video control in storyline 360 for interactive video navigation.
    How to Use Jump-to-Time Trigger to Control Video in Storyline 360April 11, 2025 - 10:51 AM
  • how to import slides from other storyline projects
    Articulate Storyline 360 – How to Import Slides from Other Storyline ProjectsMarch 25, 2025 - 5:52 PM
  • ohs-traffic-control-training-for-construction-workers-featured-image
    OHS – Traffic Control Training Course for Construction WorkersSeptember 9, 2024 - 5:56 PM
  • ohs-road-traffic-control-training-for-road-maintenance-workers-featured-image
    OHS – Traffic Control Work Zone Safety Training for Road Maintenance WorkersAugust 1, 2024 - 3:22 PM

Get a Free Prototype Customized with Your Content.

Our Portfolios Explore Our Extensive Collection of eLearning Courses.

GET A FREE ELEARNING SAMPLE

We transform your training material into engaging, SCORM-compliant courses.

Request a Free Sample  

Our Services


  • Rapid eLearning Solutions

  • Custom eLearning Development

  • Flash to HTML5 Conversion Services

  • Mobile Learning Solutions

  • Translation and Localisation Services

  • Gamification eLearning

Our Office Address

Asia: 704, Topaz Plaza, Punjagutta, Hyderabad, Telangana, India 500082

Australia: P.O. Box 107, Brisbane, Queensland, 4030

Canada: 750 Oakdale Rd Suite 56, North York, ON M3N 2Z4, Canada

USA: 12218 Old Gage Ranch, San Antonio, Texas 78245

Copyright ©2026 Swift eLearning Services.
  • Facebook
  • Twitter
  • LinkedIn
  • Youtube
How AI Helps Instructional Designers Create Courses Fasterhow-ai-supports-instructional-designers-in-modern-elearning-developmentaccordion interactionsUsing Accordion Interactions in Custom eLearning Courses for Better Engagem...
Scroll to top