I’m having problems with my if, else liquid code. Basically it takes the first 2 characters of the postcode and assigns an “area” to the field. The first assign will be replaced with dynamic data once I have this working. Its applied at the bottom of the form on this page https://tasbus5.treepl.co/membership/members-add-business-listing. The “area” variable is correct but the ‘areaValue’ is getting assigned to the last elseif statement
Currently I have :
{% assign area = “7050” | slice: 0,2 %}
{{area}}
{% if area == "70" or area == "71" %}
{% assign areaValue = "South" %}
{% elseif area == "72" %}
{% assign areaValue = "North" %}
{% elseif area == "73" or area == "74" %}
{% assign areaValue = "West" %}
{% else %}
{% assign areaValue = "" %}
{% endif %}
{{areaValue}}
Any help appreciated. I can’t see whats causing the issue.