Forum
Auto add "https://" to the front of link fields if missing?
Hi,
One field that I use quite often on client sites is a text field for links. I either leave a help note informing the clients to omit the "https://" in front of their link (because I've added it in the Perch template), or the opposite: leave a help note informing them that they need to remember to include "https://" in front of their link (because it isn't in the Perch template).
Is there any way in Perch to apply some logic to a field used for a link, one that would leave a field's contents alone if it spotted a "https://" in front, or that would add "https://" if it wasn't found? This would client-proof the link field as well as let me omit the help text and streamline content entry.
Thanks!
You could create a field type to do that, certainly. It'd be pretty simple.