thetuningspoon Posted June 25, 2015 Share Posted June 25, 2015 I am having a problem where I need to prevent a Page field that is using autocomplete from allowing me to select the page I am currently editing. I thought that was supposed to be the default behavior, but it is allowing me to select the current page anyway. Since the custom PHP code option doesn't work with autocomplete, I'm a bit at a loss for what to do. Link to comment Share on other sites More sharing options...
thetuningspoon Posted July 7, 2015 Author Share Posted July 7, 2015 Clarification... the page didn't allow me to save the self-referential value, but it did appear in the ajax search and allow me to select it from the list. This is a big problem for a site I'm working on at the moment. To solve this I had to edit InputfieldPageAutocomplete.module and add the following to getAjaxUrl() after the first line of the function: // Prevent selecting the page this field is on $thisPageId = $this->input->get->id; $selector .= ",id!=$thisPageId"; It seems like this is a bug. 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