I’m using ACF and storing a phone number in a post type. Let’s say the number in the text field looks like this: (123) 456-7890. I then imported the dynamic field on the page template with Bricks builder, but I need to change the dynamic link to remove all the special characters and spaces.
In the text link, I’ve done: tel:{acf_phone} with phone being the custom field. It’s returning: tel:(123) 456-7890. I need it to return, tel:1234567890.
How would you all recommend I implement something like this with Bricks?
This appears to work in the builder, but not on the front end. I’ve flushed cache for this page and site wide, but still seeing the characters in the links. I’ve tested “tel:{mb_location_phone}” and it leaves the characters intact, whereas tel:{echo:onnum(mb_location_phone)} is stripping the characters.
I noticed this because I was seeing 404s for "/tel:636-671-7371
It’s working now. It was a caching issue. I add another element with a loop to pull the same dynamic field, saved, then preview the page, then scoop off the appended preview characters in the URL, then purge cache on that page a couple times and finally it came about…then I just deleted the extra element.
Maybe it isn’t necessary, but I also added +1 before the number.