Mackski Posted October 18, 2016 Posted October 18, 2016 So I have this weird situation, where I need 2 x pageAutoComplete selectors on a page, and the second is reduced by the first. I've tried a few different combinations without success. Code for selector in second pageAutoComplete: return $pages->find('template=committee_event,committee_draft='.$page->committee_draft->id.',include=all'); Where $page->committee_draft->id is the value of the first pageAutoComplete, and committee_draft is an pageAutoComplete on the template committee_event
Robin S Posted October 18, 2016 Posted October 18, 2016 I don't think that's going to work. For starters, you can't use the "Custom PHP" option with Autocomplete. See the field description: Quote NOTE: Not compatible with PageListSelect or Autocomplete input field types. Also, the type of dependent select you need only works for select inputfields. You could try having the second Page field use a select inputfield and use this as the "Custom selector": template=committee_event, committee_draft=page.committee_draft, include=all Not sure if dependent selects work with the first inputfield being anything other than a select, but it's worth a try. Edit: it doesn't work - both fields using this type of dependency must use a Select, Select Multiple or AsmSelect. 1
szabesz Posted October 19, 2016 Posted October 19, 2016 @Mackski Hi, You might want to check out these: 1
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