Adding Error Messages: Difference between revisions
(New page: =Adding Error Messages= Error messages can be used to tell end-users that they have not given a response to a specific interaction and need to do so before moving on to the next page. ...) |
No edit summary |
||
Line 20: | Line 20: | ||
We recommend writing error messages in bold text or in a different colour to the rest of the text on the page so that it will be easier for end-users to see. | We recommend writing error messages in bold text or in a different colour to the rest of the text on the page so that it will be easier for end-users to see. | ||
==Naming your error message== | |||
Each error message needs to be given a name that is unique to the page that it is on so that it can be used in the logic. | |||
'''Important:''' You cannot give an error message the unique name '''error''' as error is a key command that is used by the logic. However, as long as it is prefixed with another word e.g. ageerror then this is fine. | |||
=The Error Message Logic= | |||
Error messages require logic but unlike other commands in LifeGuide, the logic needs to be written on the error message view of the page that you want the error message to show on, not in the intervention file. | |||
Each intervention page has a '''page creator''' view for creating the page and an '''error messages''' view to write the error message. This is located below the insert panel (Figure 1) |
Revision as of 10:14, 5 November 2010
Adding Error Messages
Error messages can be used to tell end-users that they have not given a response to a specific interaction and need to do so before moving on to the next page.
Error messages are useful if you want to ensure that end-users interact with the page in a certain way. Examples of when you might want to do this include:
- You need end-users to respond to a specific interaction(s)
- You need to make sure that an end-user’s login details have not already been registered
- You need to check if an e-mail address that an end-user enters is valid
- You want end-users to confirm their response by entering it twice
- You need to check that an end-user has entered the correct combination of letters and/or numbers given to them previously (e.g. a participant number)
- You want end-users to enter a specific response (e.g. a study code)
NB: An end-user cannot move to the next page in the intervention until the specified interactions have been completed correctly.
Adding Error Messages to Intervention Pages
Error messages are added to pages using a text box that has been set as an error type. Although the error message is always visible on the page in the authoring tool, it will only be shown to end-users if the error it refers to has occurred (e.g. if they have not entered the required information).
We recommend writing error messages in bold text or in a different colour to the rest of the text on the page so that it will be easier for end-users to see.
Naming your error message
Each error message needs to be given a name that is unique to the page that it is on so that it can be used in the logic.
Important: You cannot give an error message the unique name error as error is a key command that is used by the logic. However, as long as it is prefixed with another word e.g. ageerror then this is fine.
The Error Message Logic
Error messages require logic but unlike other commands in LifeGuide, the logic needs to be written on the error message view of the page that you want the error message to show on, not in the intervention file.
Each intervention page has a page creator view for creating the page and an error messages view to write the error message. This is located below the insert panel (Figure 1)