Forms - Linking questions to supporting material

From All n One's bxp software Wixi

Jump to: navigation, search

1 Overview

Within every form, you can add questions. Each question can be linked to training or support material. This guide discusses the options available.


When you add a question to a form, that question comes with a large array of capabilities. We are looking at two specific elements of that question.


2 Step by Step

2.1 The initial build

If you already have a form you can play with, you don't need to build a new one


  • Log into bxp
  • Main Menu > Form Management > Form - Primary Management > Form - Create
  • Choose a "Blended" type form
  • Give your form a name
  • Click create

From the console on the left hand side, choose

  • "Question Addition"
  • Choose the "Basic - Text Box" type
  • Call the question "Demonstration"
  • Click "Add Question"


When the question has saved choose "Review the build", the big green button from the console on the left hand side.


You should now see your form as follows

form linking 001.png


2.2 Question Editing

To the right of the question you'll see the pencil icon. edit this.png This icon allows you to edit the question. Click it to see the following


form linking 002.png


We are interested in the two lines marked

  • External Reference
  • eCourse Reference


Into the External Reference you can put any URL. For example, putting https://www.google.com into this box will provide the user with an instant link to Google.


The eCourse reference expects to receive an eCourse reference code which will be constructed as XX-YY-ZZ, where X is the Book Id number, Y is the Chapter Id and Z is the Page Id. You can find this reference code on any of the eCourse pages that you have access to.


If the training material you are linking to is in an eCourse, you will be able to report on how often the link has been used.


Add in

into the two boxes respectively. Go to the bottom of the page and click "Update question"


You will now note the two new icons to the left of the question. Hovering over the link provides the user with more detail as to where the link will go. Clicking the button will always open the material in a new window so that no data is lost.


form linking 003.png


3 Advanced Options

For very dynamic linking it is possible to change the destination of the link in real time based on options selected by the user. Using JavaScript, each button is uniquely named to allow you to alter the destination address.


Firstly identify the button you wish to dynamically update by right clicking and choose inspect element. It's going to be something like

  • btnWeb_btnRefernce_strCDA_839_field_0_1
  • btnWeb_btneCourse_strCDA_839_field_0_1


Simply change the onclick of the item to set where you would like it to go.


 
if (condition1 == true) {
    document.getElementById('btnWeb_btnRefernce_strCDA_839_field_0_1').onclick = "window.open('newurl1.html');";
}
else if (condition2 == true) {
    document.getElementById('btnWeb_btnRefernce_strCDA_839_field_0_1').onclick = "window.open('newurl2.html');";
}


Remember that you need to put some data into the reference fields for the button to show in the first place for you to then be able to change the content.


Network paths to data also work, providing your browser allows for UNC references.