Skip to content

Commit f5b97ae

Browse files
committed
Add disable option for progress bar and help text
1 parent e5bc5a7 commit f5b97ae

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

examples/questionnaire/Example.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@
120120
id: 'multiple_choice',
121121
tagline: "FYI, You can always go back 👈, use the up arrow on the bottom.",
122122
title: 'Multiple choice question:',
123+
helpTextShow: false,
123124
type: QuestionType.MultipleChoice,
124125
multiple: false,
125-
helpText: ' ',
126126
allowOther: true,
127127
required: true,
128128
options: [

src/components/FlowForm.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
<div class="f-footer">
5555
<div class="footer-inner-wrap">
56-
<div class="f-progress" v-bind:class="{'not-started': percentCompleted === 0, 'completed': percentCompleted === 100}">
56+
<div v-if="progressbar" class="f-progress" v-bind:class="{'not-started': percentCompleted === 0, 'completed': percentCompleted === 100}">
5757
<div class="f-progress-bar">
5858
<div class="f-progress-bar-inner" v-bind:style="'width: ' + percentCompleted + '%;'"></div>
5959
</div>
@@ -136,6 +136,10 @@
136136
language: {
137137
type: LanguageModel,
138138
default: () => new LanguageModel()
139+
},
140+
progressbar: {
141+
type: Boolean,
142+
default: true
139143
}
140144
},
141145
data() {

src/components/Question.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</span>
2929
</template>
3030

31-
<span class="f-sub" v-if="question.subtitle || question.type === QuestionType.LongText || question.type === QuestionType.MultipleChoice">
31+
<span class="f-sub" v-if="question.subtitle || question.helpTextShow && (question.type === QuestionType.LongText || question.type === QuestionType.MultipleChoice)">
3232
<span v-if="question.subtitle">{{ question.subtitle }}</span>
3333

3434
<span class="f-help" v-if="question.type === QuestionType.LongText && !isMobile" v-html="question.helpText || language.formatString(language.longTextHelpText)"></span>

src/models/QuestionModel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default class QuestionModel {
7272
this.content = null
7373
this.inline = false
7474
this.helpText = null
75+
this.helpTextShow = true;
7576

7677
Object.assign(this, options)
7778

0 commit comments

Comments
 (0)