Jump to content

Recommended Posts

Posted

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 :huh:

Posted

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.

  • Like 1

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...