Hi there!

Really like the module, love the fact that we have do to big parts of the job our self, it helps not having un-wanted behaviours :)

I do have a few questions, I guess it can help others as well.

To give some context:

  • I had select2 before
  • My fields are managed programatically so to determine which fields I want to be able to 'Add term on fly', I added a settings 'allow_create' in my field.

My questions:

  • When I activated the module, I didn't have access to the admin page. When I looked at the module, it has an access argument 'administer selectize'. But I can't find this permission in my permission list. Aren't we missing the hook_permission?
  • Drupal understands "_none" as an empty value. Selectize understand "". I can easily unset _none option and set "" instead, but I guess this is going to mess up validation and submission. I haven't find a way to change the empty value of selectize
  • Last but not least, for term creation. I am trying to replicate select2 logic but I am having some trouble with it. The term creation happens in element validate. After all terms are created, I fire a form_set_value($element, $values_to_set, $form_state); $element['#value'] = $values_to_set; $element['#validated'] = TRUE; as they do in select2 (values to set contains an array of tid, including the newly created), but the Drupal "_form_validate" seems to be fired first, so it always return "An illegal choice has been detected. Please contact the site administrator. (but it does created the new term).

Thanks for your help!

Ed

Comments

baroneddy created an issue. See original summary.

dnotes’s picture

Status: Active » Needs review

Hi Ed! I just found Selectize and have been working on getting it ready to go in a distribution - it's so fantastic! Anyhow I've done some work that I think will solve your issues, but all the patches are in other issues, so here's a list:

Hope this helps! I'll mark this as Needs Review, but if it solves your problem, you might change the status to Closed (duplicate) or some such.