Forum Discussion
User notes that they can print and email
Hi all. I built a course earlier this year that contains a "notes" function to allow users to take a moment to reflect and type their thoughts on certain questions. This is used in place of a typical multiple response/choice type question. Thought I'd share it here with you!
Here are the files:
Screenr Part 1: Demonstration - https://player.vimeo.com/video/204928444
Screenr Part 2: How It Was Built - https://player.vimeo.com/video/204928450
Storyline Source: https://bit.ly/3Kd96as
Published Output: https://bit.ly/3Z0hj5X
Cheers!
Stephanie
237 Replies
- joannamiller-8cCommunity Member
Thanks again for your suggestions and for staying with this thread, Phil! I'll continue to puzzle through it and post my progress (if I make any!).
- PhilMayorSuper Hero
If you hit a stumbling block, post a slide or PM me and I am sure it can be fixed.
- joannamiller-8cCommunity Member
I was eventually able to solve this and get the Notes layer to show continuously throughout a slide that contains button-activated show/hide layers. However, my solution isn't optimal because on pages with layers it requires me to uncheck "Hide other slide layers" in Slide Layer Properties to enable the Notes layer on the master slide to always display. I wasn't able to accomplish this using a variable alone.
Unfortunately I am unable to upload a slide to this forum, but I hope that with the info below you will be able to understand what I've done and possibly suggest some way to simplify it by adding another trigger or variable.
--
Key variable: ShowNotes which shows or hides the notes layer that lives on the Master Slide (Show layer Notes if ShowNotes=true)
Master Slide:
On content slides:
Base layer - contains hotspot over a button on the Master Slide that toggles variable ShowNotes when user clicks; for each button that shows a layer on click, hides all other layers on the page (except Notes).Thanks, as always, for the encouragement and assistance from this forum!
Joanna
- PhilMayorSuper Hero
Mailto has a character limit that may be the problem
- roneltaruc-5c94Community Member
I just used the same story file Stephanie provided. In the published file, here's the text I typed in:
Activity: Delivering Coaching Feedback
Get managers consistently & confidently including right elements in a coaching conversation by giving a simple tool and practicing. Get this to be second natureā¦Increase manager confidence and speed in delivering focused feedback using the COACH model to structure the coaching conversation
Activity: Coaching Scenarios & Practice
If you do not have recorded calls, use these scenarios to practice the coaching delivery on the previous page.Then when i click on the email button, here's what's shown:
Thanks guys for helping.
- onEnterFrameCommunity Member
Pretty sure the problem is the ampersand (&). If you want to let learner's use characters like that then you will need to 'escape' or encode it. Kinda like this:
encodeURIComponent(your_var)
This may help: https://www.w3schools.com/jsref/jsref_encodeURIComponent.asp
- roneltaruc-5c94Community Member
Thank you James! That surely solved the issue why not all text appear on the email bocdy. There's one thing still bothering me though. The text seems to ignore line breaks. Even though there are 3 paragraphs in my sample - they were all interpreted as one continuous paragraph. Is there a work around for this? Thanks!
- onEnterFrameCommunity Member
Hmm I don't recall if SL strips the line breaks out when it saves the variable. If not then they are probably in there as '\n' which will not be displayed in HTML. (Your email editor probably defaults to HTML). So you will need to find all instances of '\n' and replace them with '<br/>'.
It would be easier if your were using a library like jQuery but it can be done with generic JS something like this:
your_string.replaceAll(new RegExp('\n', 'g'), '<br/>');
We are using the standard JS replaceAll function but have to use a Regular Expression to match the pattern of the unseen ASCII line breaks.
Your milage may vary on the code above as I didn't test it before posting it here....
- roneltaruc-5c94Community Member
Sadly even after the latest update the breaks in the text entry aren't recognized. It'd quite strange that this would happen since as you said James, variables should save the the content plus its line breaks. :(
- OwenHoltSuper Hero
It really isn't that strange. The printable page is being rendered through HTML. In HTML, some characters are 'Reserved'. For example the less than (<) & greater than (>) signs are used to open and close tags and so the browser might be confused by their use as pure text. Therefore, special characters have an assigned 'entity' that you can use to display them. Character entities look like this:
&entity_name; or &#entity_number;
Note that character entities always start with the ampersand (&) which makes it one of these special characters that html treats differently. The correct way to display an ampersand in html is to use & or &Line breaks are similar. In HTML they require a specific element which is written as: <br>.
StoryLine, on the other hand, is recording your actual text entry and holding it in a variable (that acts like a container). It has captured and recorded '&' as '&' and not as '&'. When you try to take text stored this way in it's native format and render it in html, it is not unlike trying to put a square peg in a round hole. You need to make some changes first.
Sometimes, it is easier to change your methodology. For example, instruct users to add their notes 1 paragraph at a time and capture each paragraph in it's own variable. Or run JS 'when the user presses a key (enter) to capture what they have input so far and add the appropriate html line break characters to a different variable to be used when printing.
Related Content
- 9 months ago
- 7 months ago
- 8 months ago
- 9 months ago
- 12 months ago