Consultation basics

Multiple Back button

The Multiple back button lets you edit a answered question.

The button consists of 3 different parts: Button, Icon and Label.

Button

The Multiple Back button is created by using the <button> tag.

<button id="mutipleBackButton" type="button" ng-click="enableMultipleBack($event)" ng-disabled="currentConsultationStep==0" class="btn button">

The following attributes are mandatory:

ID The button tag is needed to create the button
Type The type defines the DOM element.
Ng-click The ng-click triggers a function when the button is clicked. In this case, the function: back($event) is triggered.
Ng-disabled Ng-disabled makes sure that the button is not active at the first step of the consultation.
Class The class is needed to give the proper CSS style to the button.

It is possible to add more classes/attributes to the button.

Icon

In order to improve usability, every button has an icon to help the user identify the functionality of the button. To add the icon, put the following code inside the <button> tag:

<span class="glyphicon glyphicon-fast-backward"></span>

To change the icon, simply modify the "glyphicon-fast-backward"

Label

The label is created in the language file so that multiple languages have the right label. To add the label, put the following code inside the <button> tag:

<span class="hidden-xs hidden-sm hidden-md">{{translation.WHAT_IF}}</span>

It is possible to create a custom label.

Usage

Here is an example of the Multiple Back button. Put the following code in the consultation template:

<button id="mutipleBackButton" type="button" ng-click="enableMultipleBack($event)" ng-disabled="currentConsultationStep==0" class="btn button">
<span class="glyphicon glyphicon-fast-backward"></span>
<span class="hidden-xs hidden-sm hidden-md">{{translation.WHAT_IF}}</span>
</button>