Jump to content

$fields->find("selector") to match fields of given type


Recommended Posts

Posted

What kinds of things can go inside a $fields->find() selector?

Can I use a selector to find fields of a given type? For instance, find all fields that are instances of FieldtypeImage?

Posted

I just needed to fiddle around some more to find my answer. :)

$image_fields = $fields->find("type=FieldtypeImage");

Looking at the data for a field I guess you can also find fields by id, flags, name and label. Nice!

  • Like 5

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...