There is a form on my webpage, which includes the following elements:
<div v-if="this.userdata.address == ''">Please enter your address</div>
Your address
<input type="text" v-model="userdata.address">
Your phone
<input type="text" v-model="userdata.phone">
Your message
<input type="text" :disabled="this.userdata.address == '' ? true : false">
In the script section of my page, I have the following code snippet:
<script>
export default {
data() {
return {
userdata: {
companydata: {}
}
}
}
.....
<script>
If the user is authorized, the "userdata" data will be populated in the fetch() method.
The issue I am facing is that when navigating to this page from another page, the functionality of checking if the address field is filled and enabling the Message field accordingly is not working. However, it works fine on page reload.
What could be causing this problem?