text entry needs to be a number or email address

Hi,

I'm wondering if any one can help me.

Using Storyline 3 we need the user to enter their Student ID number & email address. As we don't use an LMS the best I'm hoping to do is make the text entry field require any number and the email address be required to include an @ symbol along with other characters.

Is there a way to do this?

 

9 Replies
Matthew Bibby

The student ID could just be a numeric entry field (as it only accepts numbers).

Then you could have some JavaScript that checks if the email address is valid.

Something like this should work (it's an incredibly basic validation check, but I don't really see the need for anything more advanced here):

var player = GetPlayer();
var email = player.GetVar("Email");
var pattern = /^\S+@\S+$/;
var result = pattern.test(email);
player.SetVar("EmailValid",result);

This assumes that you have a text variable called Email where the user enters their email address and a True/False variable called EmailValid which should be False by default.

Here's a demo.

Here's the source file.

Yell out if you have any questions.

Ramon Talavera

Matthew,

Sorry to bother you but after reading your response here to Cath, and after many days spent looking for information and feeling frustrated for not finding it, I believe that you could help me solve my problem. 

I designed a based-game learning project in Articulate Storyline 360. Students  get access to it through a webpage or blog page but not from an LMS. The project is hosted in a link created in AWS. When students log in to the webpage, and click an image, they are directed to the link of the game. Right now, students can log in immediately, but I want to include (within the game, not from the website) the following information before they get access to the game:

I want to include a SIGN UP form for new students AND

a SIGN IN form for those who already signed up.

I want to get the students' First Name, Last Name and email from the registrations forms. I know I can do this within the variables attributes, but I would like that information self populated in an excel sheet to create a listserv, and I don't know how to do it. And how to connect  the students' information with the excel sheet to create a listserv? As you can see, the most important thing for me is to create the listserv. Do I need coding? I'm not a programmer so I don't know how to do that.

Do you think you can help me? I'm very frustrated for not finding this kind of information.

Here is the link to the webpage.  https://spanishheritagespeakers.weebly.com/

If you click in the image of the woman, you will be directed to the game. (it is a project in Spanish)

Thank you in advance.

Ramon

Matthew Bibby

Ramon, quite a bit goes into setting up something like this.

And as you are collecting personal information, there are privacy considerations.

This isn't something I'll be able to quickly help you out with here as it would likely take numerous hours to get running correctly. 

Ramon Talavera

Cath,

I really appreciate you sending me this video. It seems that it could have the solution for what I want to do. However, it looks complicated since I'm not a programmer. Yet, I'm willing to study the video and make some tests. If I'm lucky creating the spreadsheet that I need to, I will let you know. I need to give it a try before giving up!!!!!

Thank you very, very much!

Ramon