DV-JF Posted June 5, 2024 Posted June 5, 2024 Hey, I'm asking myself, what's the best way to filter a SelectableOptionArray for multiple Values. Is there a better way than doing it like this: if( $page->optionField->hasValue('foo') || $page->optionField->hasValue('bar') || $page->optionField->hasValue('buzz')) { echo $something }; Any ideas welcome! Greets!
elabx Posted June 5, 2024 Posted June 5, 2024 Maybe you can do? $page->optionField->find("value=foo|bar|buzz") Not sure what's the property that actually holds the value ? Let me know if it actually works! lol
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