Jump to content

InputfieldChosenSelect


LostKobrakai

Recommended Posts

  • 3 weeks later...

# Small Note
Installing the module via Somas ModulesManager (Lightbox) will only install InputfieldChosenSelect but not InputfieldChosenSelectMultiple. Would be helpful to have a note in the description and/or the error note (if InputfieldChosenSelect is selected for a multi Page Field) that this should be done manually.

Link to comment
Share on other sites

  • 2 weeks later...

Updated the module with a newer chosen release (security related) and fixed the hardcoded admin location in the warning about wrongly configured fields.

@kixe

There's already a warning if you're using a multi-page field with the wrong inputfield (because it changed from the first versions of the module). I've added a note about installing it beforehand. But there's also no * in the inputfield select for the field, which should indicate that the inputfield is not meant to be used for a multi page field.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

@LostKobrakai - see issue here: https://processwire.com/talk/topic/13164-http-error-500-when-opening-some-template-pages/

Described issue happens when script reaches allowed memory limits. I guess it is because ChosenSelect fails to handle too much pages (20000 pages in m case). Anyway, when I've changed inputfield to PageAutocomplete - issue dissapeared.

Link to comment
Share on other sites

That's expected. The chosen library was created to be a seemless enhanced select field (meaning it will be fully useable without js), which is why it does not have any ajax capabilities and therefore has the same problem as all other non ajaxy inputfields when loading a ton of pages.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Just a heads up that the newest version (ProcessWire 3.0.22 devns) breaks some things, one of which is module settings fields on some modules, this being one of them (the Placeholder Text field will not save any value). (Still looking into the cause and hope to discover fix soon as it also affects my inputfield modules).

**This is now fixed in 3.0.23 devns**

Edited by Macrura
issue resolved
  • Like 2
Link to comment
Share on other sites

  • 5 months later...

thank you lostkobrakai, awesom module!

suggestion: could you add a css rule that hides the select input right from the beginning? it is hidden afterwards via jquery anyhow but as long as it is visible it leads to some ugly display of the unstyled select field.

do you understand what i mean? :)

Link to comment
Share on other sites

hi lostkobrakai,

i think you didn't get me... see this screencast. i think it is much nicer to hide the select via css (after the reload) than having it show up and hide it afterwards:

chosen.gif

anyhow... if you do not like this enhancement i'll just leave my line css in place. but i don't see a reason not to add this by default for every chosen input field

#Inputfield_my_chosen_select { display: none; }

 

Link to comment
Share on other sites

I fully understand. Hiding the select essentially means the input is unusable if javascript does not work for whatever reason. That's exactly what you want to prevent with any progressive enhancement. It's true, that in the context of the backend it might not be a pressing issue, but I'm not really convinced that showing nothing before js kicks in is much better than showing the original select field. There will always be a layout update.

Link to comment
Share on other sites

Well you could hide with CSS add a CSS animation to unhide after a few seconds, which would ensure the select to be visible (in theory). Because of the few seconds delay the JavaScript will probably make changes to the DOM so the original select won't be visible. I've used this tecnhique in a site with a loader, to remove the loader even if there's something with JavaScript.

Anyway, I think this kind of FOUC doesn't matter too much in an admin.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
20 hours ago, LostKobrakai said:

I'm not sure if it works correctly, but by a quick glance in the code FieldtypeSelectExtOptions should let you choose InputfieldChosenSelect if installed.

Nice, I am installing the module right now!

How come it cames in 2 separates modules? I see  InputfieldChosenSelect and InputfieldChosenSelectMultiple in my new modules list.

Link to comment
Share on other sites

  • 4 months later...
7 minutes ago, LostKobrakai said:

I'm not sure what exactly you mean. It should show the selectable items and filter them if you start typing.

oh yeah, i was expecting to see the search bar and icon but that's only on single selects not multiple.

Link to comment
Share on other sites

  • 3 months later...

Is it somehow possible to use this in the frontend? (I'm new to PW, sorry for the question) .

Feature Request: Also, i have the multiple field using pages that have children (nested categories). Would it be possible to visually clarify this relation? Right now all the pages are listed (which is a good thing) but the user can't tell the difference between main categories and sub categories…

BTW, love your module, it's the easiest to use to select relations imho.

Link to comment
Share on other sites

16 minutes ago, noelboss said:

Is it somehow possible to use this in the frontend? (I'm new to PW, sorry for the question) .

Feature Request: Also, i have the multiple field using pages that have children (nested categories). Would it be possible to visually clarify this relation? Right now all the pages are listed (which is a good thing) but the user can't tell the difference between main categories and sub categories…

BTW, love your module, it's the easiest to use to select relations imho.

Hi @noelboss

You can play with "Label field" options. Select Custom format and put something like {parent.title}.

Are you talking about front end editing? 

 

Link to comment
Share on other sites

Then i will also get the parent of all categories, and it's still not visually clear:

  • Categories - Cat 1
  • Categories - Cat 2
  • Cat 1 - Child Cat 1

I'm talking about using the input type in the frontend for editing yes, like in a firm that I build and using the type as input. I'm no yet sure how to do it the PW way.

Link to comment
Share on other sites

Frontend editing implies the native processwire functionality for that, not apropos building your own forms;
when you build your own forms you can use any jquery plugins that you want, so you can just load the chosen assets and init the field on your form.

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
×
×
  • Create New...