Would anyone help me please?
@bhojkamal Help with what exactly? All you’ve said is you want to build a site that’s a rip off of another. So what exactly do you need help with? What are you stuck on?
Hello, I need to develop exact template - design and develop like this - COPD Assessment Test CAT for my patient record system.
In my project, I have used LARAVEL 8 and VUE.js 3 and Bootstrap 5. I have designed other screening question already. I need to add this too.
If you guys have seen or know such design, please help me.
Would anyone help me please?
@bhojkamal Well, you’re not using models in Vue correctly for a start.
If a user can select one of multiple options then make them radio inputs, not multiple text inputs. This is forms 101 to be honest. Give the radios the same name but different values, and you can then use v-model on those to get the value the user selects:
<label>
<input type="radio" value="0" v-model="cough">
<span>0</span>
</label>
<label>
<input type="radio" value="1" v-model="cough">
<span>1</span>
</label>
<label>
<input type="radio" value="2" v-model="cough">
<span>2</span>
</label>
<label>
<input type="radio" value="3" v-model="cough">
<span>3</span>
</label>
<label>
<input type="radio" value="4" v-model="cough">
<span>4</span>
</label>
<label>
<input type="radio" value="5" v-model="cough">
<span>5</span>
</label>
Now, when a user clicks on a radio value, the value of this.cough in your Vue component will be updated with the value of the radio the user selected.
export default {
data() {
return {
cough: null // This will be updated when user selects an option
};
}
}
Because this.cough is reactive, you can show that in your template:
<template v-if="cough">
<p>Selected cough value: {{ cough }}</p>
</template>
No need for that click handler. You’re using a v-model.
Please or to participate in this conversation.