I have two fields set up one named: wpcf-postcode and the other wpcf-postcodeshort
and this works fine however I would like to bring across only the first 4 characters, so if a postcode is BA22 1PJ it would copy across BA22 only.
Is there any coding I can add to this snippet to make this work and only copy the first 4 characters.
Perfect that works great. I have another issue I'm also trying to solve below and wonder if you are able to help.
I have a map linked to an toolset image field where it uses a coloured pin to display on the map depending on which category they belong to. Red pin for Category 1 and Blue for Category 2. I would like to automate this process if possible.
The link to the actual map page is hidden link
I have a category set up named Membership Types with taxonomies set up as Category 1 and Category 2.
And an toolset image field set up named map-pin which I then use an image named pin-cat1.png image for Category 1 and pin-cat2.png image for Category 2
What I would like to happen is that when they belong to the Category 1 the toolset map-pin field automatically chooses the image pin-cat1.png and then if they belong to Category 2 the toolset map-pin field automatically chooses the image pin-cat2.png