Jump to content

PageField: Switching from Checkboxes to Page Autocomplete does not work


doolak
 Share

Recommended Posts

I did not recognize until now this fantastic Input Field - saw it yesterday in the Repeater video and want to use it now instead of a Page field where i am using Checkboxes now.

If i switch from Checkboxes to Page Autocomplete the new field does not show up any results - when i create a new field with the same settings it works just fine. But as there are already values set i have to switch...

Can anybody confirm that problem or tell me how to solve it?

Link to comment
Share on other sites

The configuration options are a little different between checkboxes and autocomplete. I don't think they are as directly replaceable as select-multiple, checkboxes and asmSelect (for example). So may take some re-configuring of the field when you change the type. It sounds like you may be talking about something more though, so I'll experiment here. 

Link to comment
Share on other sites

Yes, of course i have different options and i have to choose the search operator and the query when i have switched to PageAutocomplete - but the problem is that the field which is switched from Checkboxes to PageAutocomplete does not show any results then. As i mentioned i have tested if a new added field works fine and it does, with the same settings for the search.

Link to comment
Share on other sites

The setting, which i had first when using checkboxes were:

1.) Parent of selectable page(s): /einstellungen/Mitglieder

2. label field: mitglied_vorname_name_geburtsdatum (concat field)

3. Dereference in API as: Multiple pages (PageArray)

When switching to PageAutocomplete i used this settings:

1.) Parent of selectable page(s): /einstellungen/Mitglieder

2. label field: mitglied_vorname_name_geburtsdatum (concat field)

3. autocomplete advanced options: Contains phrase or partial word (but tried the others as well)

4. fields to query: mitglied_name mitglied_vorname

5. Dereference in API as: Multiple pages (PageArray)

I am using a dev version of PW 2.3 which i downloaded few days ago.

Link to comment
Share on other sites

I've switched back and forth between checkboxes and autocomplete, but so far can't duplicate the issue you were running into there. 

I wasn't able to duplicate the issue with german umlauts (they are matching well here).

However, I did have trouble once I started using a concat field as the "label" field. For some reason, that doesn't not seem to work at all with the autocomplete. I'll take a closer look at this and see what's up there. But try changing your label field to 'title' or something else and see if that fixes the issues you were getting?

You might also try changing your autocomplete search operator to '%=' as that will match text with fewer than 4 characters, as well as more partials.

Link to comment
Share on other sites

Yes, the problem was the field concat. Switched to title and it works now! Thanks, Ryan!

Strange that the german umlauts are not found here - i have to enter "u" for "ü", then it finds the name with the umlaut "ü"...

Link to comment
Share on other sites

But this does not make any difference - of course not, because it just sets the replacements for the page name (but nice to know, btw - i always thought that it would be better to have "ue" than "u" in the page name).

Link to comment
Share on other sites

I had the same issue with autocomplete not giving results, it appears to happen only when the input it place in a FieldsetTab (for me at least). Also, the input was not receiving the "ui-autocomplete-input" class when in the FieldsetTab, so from there I assume jqueryUI is not able to find the field.

Link to comment
Share on other sites

This is true. Currently the autocomplete does not work in FieldsetTabs. It basically has to be visible when the page initializes. I'm not totally sure why, and if this is specific to jQuery UI's autocomplete or something about our usage of it. That ui-autocomplete-input class is one assigned by jQuery UI rather than us. 

Link to comment
Share on other sites

This is true. Currently the autocomplete does not work in FieldsetTabs. It basically has to be visible when the page initializes. I'm not totally sure why, and if this is specific to jQuery UI's autocomplete or something about our usage of it. That ui-autocomplete-input class is one assigned by jQuery UI rather than us. 

The map marker field similarly has issues, but alternatively has no problem if the page initializes on the tab the field is on (this in not the case for auto-complete as it never works in a tab). I did a site about a year back that had a gmap in a bootstrap tab, the solution was to recreate the map on tab switch, could be a similar solution here? I'm not sure I haven't had a chance to peek at the code, just a thought though.

Link to comment
Share on other sites

  • 3 months later...

I never was able to reproduce this before. Can you paste in the characters that aren't working for you? I will try to paste them in some pages and then test it out. Also check that you are using the %= operator in your autocomplete settings with the field (not positive that's necessary, but it does bypass the index in case there are any indexing issues with greek characters). 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...