a-ok Posted June 17, 2019 Share Posted June 17, 2019 Why does this return null? $page->products_sku->type I thought you could check a field's type? I know this works... $fields->products_sku->type But if I have the following, how could I check the type? $slides = $page->products_sku; // I need to return $slides type bd($fields->products_sku->type); Link to comment Share on other sites More sharing options...
lokomotivan Posted June 17, 2019 Share Posted June 17, 2019 $fields->get("priduct_sku")->type 2 Link to comment Share on other sites More sharing options...
teppo Posted June 17, 2019 Share Posted June 17, 2019 10 minutes ago, lokomotivan said: $fields->get("priduct_sku")->type Exactly. And just to clarify: $page->field_name returns a value stored in the field, not a field object, so that's why you can't check the type of the field that way ? 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now