How to tailor or change the information presented on a page based on information about the user

From Lifeguide Wiki
Revision as of 12:24, 23 January 2013 by StephHughes (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Each page can be tailored to the individual user. For example, you may want males to see different information to females, or participants randomised to different groups to see differing information. You can also tailor pages depending on the information the user has entered on a previous page, for example, there may have been a tick a box for them to indicate if they have trouble sleeping; on one of the following pages you may want information about sleeping to appear only to those who ticked that box. Use the following steps to help you do this:

  • Add the text box to the page using the button on the bottom tool bar
  • Make each box you want to be tailored a 'feedback' text box. When you first add the text box to the page the type will automatically be set to 'normal'. You can change this to 'feedback' in the 'Other Properties' section which can be found in the 'textbox properties' tool bar on the right hand side of the authoring tool.
  • Once you have selected 'feedback' a box will appear asking you to give the feedback box a 'Unique name'. Make sure this is unique to the page.
  • You will then need to tell LifeGuide when to show that text box. You do this in the logic. Here is a simple example:

show pagename.textboxname if (gender = "female")