Problem/Motivation

Similar to what Select 2 allows you to do.

Proposed resolution

Provide a select_tagify element + the needed JS to initalize Tagify on the element

CommentFileSizeAuthor
#10 select_tagify.gif727.95 KBsimonbaese

Issue fork tagify-3352158

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

DieterHolvoet created an issue. See original summary.

dieterholvoet’s picture

Issue summary: View changes
anybody’s picture

@DieterHolvoet to clarify this: You mean tagify should also work as better ux replacement for
<select multiple></select>
right?

Would you expect that as global replacement or as a widget to select on these fields?

dieterholvoet’s picture

My request is for a new select_tagify element for use in custom code, but afterwards this could also be used as an optional global replacement and in the existing field widget.

anybody’s picture

Thanks @DieterHolvoet +1 on both! :)

gxleano’s picture

Version: 1.0.x-dev » 1.1.x-dev
gxleano’s picture

Version: 1.1.x-dev » 1.2.x-dev

simonbaese made their first commit to this issue’s fork.

simonbaese’s picture

Status: Active » Needs work

Pushed work in progress to issue fork. Current approach:

  • Use Select form element as base for new TagifySelect form element.
  • Attach tagify to input HTML element with dropdown which copies options and default value from select HTML element.
  • Update selected values via add and remove Tagify events.
  • The value callback then is the same as for a select form element.

Some todos:

  • Handle single value setting in form element. At the moment, multiple values setting is used.
  • Check edge cases for no options, identical options text and identical options keys.
  • Check hierarchical options.
  • Check if JavaScript can be simplified.
  • JavaScript linting.
  • Add form element description.
  • Work on form widget.
  • Add tests.
simonbaese’s picture

StatusFileSize
new727.95 KB

And here is a small demo.
select tagify demo

gxleano credited kensae.

gxleano’s picture

gxleano’s picture

Assigned: Unassigned » gxleano

gxleano’s picture

Update from #9

Pushed work in progress to issue fork. Current approach:

  • Handle single value setting in form element. At the moment, multiple values setting is used.
  • Check edge cases for no options, identical options text and identical options keys.
  • Check hierarchical options.
  • JavaScript linting.
  • Add form element description.

Some todos:

  • Check if JavaScript can be simplified.
  • Work on form widget.
  • Add tests.
gxleano’s picture

Update from #15

Pushed work in progress to issue fork. Current approach:

  • Handle single value setting in form element. At the moment, multiple values setting is used.
  • Check edge cases for no options, identical options text and identical options keys.
  • Check hierarchical options.
  • JavaScript linting.
  • Add form element description.
  • Check if JavaScript can be simplified.
  • Work on form widget.

Some todos:

  • Add tests.
gxleano’s picture

Assigned: gxleano » Unassigned
Status: Needs work » Needs review

  • gxleano committed 909ee624 on 1.2.x
    Issue #3352158 by gxleano: Disable input when an item has been select in...
gxleano’s picture

It will be included in release 1.2.15

gxleano’s picture

Status: Needs review » Fixed
gxleano’s picture

Status: Fixed » Closed (fixed)