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.
We are using the Url field type.
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.
There’s a URL field? Where can I find this?
Oops sorry to tag notify me
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.
Theres a pro version? where?
You must be logged in to reply to this topic.
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!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.