Home › Forums › General Issues › Link field can’t use readonly › Reply To: Link field can’t use readonly
You cannot make the field readonly.
I do not have any examples, there are 2 ways that you can do this.
The first is to use custom CSS in the admin to hide the edit and delete action button for the field.
[data-key="YOU FIELD KEY"] .acf-input .link-wrap a {
display: none;
}
The second would be to add custom JavaScript to the admin to remove the action buttons instead of hiding them.
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.