Struggling with displaying empty strings on my website for customers who haven't filled in address 2 or address 3 information. When a customer creates an account, they can skip any irrelevant fields like this:
business name
address 1
address 2
address 3
city, state, zip
For example, if a customer only fills out their business information as follows:
Jonnys biz
123 Bear Lane
Seattle, WA 98119
In Vue, it seems that unused fields (such as address 2 and address 3) are sent to the backend as the string 'null'.
So on my website, if a customer leaves out address 2 and address 3, it looks like this:
Jonnys biz
123 Bear Lane
null
null
Seattle, WA 98119
What I want is for the address to display like this:
Jonnys biz
123 Bear Lane
Seattle, WA 98119
I have made some modifications to the code. Here is a snippet:
<v-col v-if="acctdetails.BusName" cols="12">
<v-row justify="center">{{acctdetails.BusName}}</v-row>
</v-col>
// Code continues...
After testing, when address 2 is null, blank space is shown. But even when I input "Suite B" for address 2, it still displays 'null'. I have checked the database table and confirmed that address 2 does have a value.
If a customer provides address details like this:
Jonny biz
123 Bear Lane
Suite B
Seattle, WA 98119
The displayed data ends up looking like this:
Jonny biz
123 Bear Lane
Seattle, WA 98119