Home › Forums › Add-ons › Repeater Field › Sort Repeater Field by Subfield in Admin (Backend) › Reply To: Sort Repeater Field by Subfield in Admin (Backend)
I’m afraid I couldn’t reproduce the issue on my end. The $value
variable will return 0 if there’s no entries in the repeater. For such case, you need to check it first like this:
if( empty($value) ) {
return $value;
}
Did you create the repeater field from other field types such as text? Do you have a same field key or name assigned to the page? Could you please share the JSON or XML export of your field group?
Thanks.
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.