Home › Forums › General Issues › ACF URL field uppercase
We have some links with uppercase letters and when we save it using ACF URL field it forces lowercase. How can we prevent this?
A simple way is to add css “text-transform: uppercase;” in div or a that you load this field.
We don’t want it to display as uppercase. But the actual href to have uppercase in it otherwise the external link gives a 404. For example http://www.something.com/TESTpage would work but in ACF URL field if saves if as http://www.something.com/TESTpage and this gives 404
What kind of field type you used?
I check text field and it is ok.
It is deeper that i thought!
In case that you can’t find anything else… make url-field to text-field and will work 100%
<a href="<?php echo get_post_meta($post->ID, 'Url', true); ?>"><?php echo get_post_meta($post->ID, 'Url', true); ?></a>
Yes, I know we could use the text field, but we wanted to use the url field for the other validations. Is there anyway to override the saving of the url field so it allows uppercase?
There isn’t anything in the URL field that I can find that should be altering the URL to lower case. I just tested this on one of my test sites and ACF is not altering the URL to lower case.
This means that you have something else that is causing it, either in another plugin or in your theme.
The URL field is currently only available in ACF5 Pro. A free version of ACF should be released this year. At least that was what the developer said.
The topic ‘ACF URL field uppercase’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.