Results 1 to 2 of 2

Thread: Synchronizing combo boxes and tag fields.

  1. #1
    Sencha User
    Join Date
    Aug 2015
    Posts
    30
    Answers
    7

    Default Synchronizing combo boxes and tag fields.

    A client has a request that an applicant be able to make a primary selection from a list of options, but then also multiple selections from the same options. The values in primary and secondary can't overlap.


    E.g. two color selection questions:


    Favorite Color: SELECT ·Other Colors: SELECT


    User picks Favorite Color RED:


    Favorite Color: RED ····Other Colors: SELECT
    ················YELLOW
    ················ORANGE
    ················GREEN
    ················BLUE
    ················PURPLE


    Red is now gone from Other Colors:


    Favorite Color: RED ····Other Colors: YELLOW
    ······································ORANGE
    ······································GREEN
    ······································BLUE
    ······································PURPLE


    User Picks Other Colors GREEN and BLUE:


    Favorite Color: RED ····Other Colors: GREEN BLUE


    GREEN and BLUE are gone from Favorite Color:


    Favorite Color: RED ····Other Colors: GREEN BLUE
    ················ORANGE
    ················PURPLE


    User picks a different Favorite Color PURPLE:


    Favorite Color: PURPLE ·Other Colors: GREEN BLUE


    Other Colors now has RED, but no PURPLE:


    Favorite Color: PURPLE ·Other Colors: GREEN BLUE
    ······································RED
    ······································ORANGE
    ······································YELLOW


    I was thinking of pairing a combobox with a tag field, but then as you can see it's a hassle trying to keep the stores aligned for both sides. I tried using filters, but they don't seem to work dynamically.


    Is there some easier way to do this in ExtJS? Like a tagfield with two input boxes, one limits to one selection, the other allow multiple?

  2. #2
    Sencha Premium Member richardvd's Avatar
    Join Date
    Jun 2011
    Location
    NL
    Posts
    255
    Answers
    22

    Default

    Use the same store instance on both tag fields. And set filterPickList: true.

Similar Threads

  1. Replies: 1
    Last Post: 1 Oct 2013, 4:16 PM
  2. Only allow combo box to be chosen once in a group of combo boxes.
    By jakejamessteele in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 2 Aug 2013, 12:14 PM
  3. triggerAction and combo boxes...
    By ewomack in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 18 Mar 2011, 12:07 PM
  4. valueField in combo boxes
    By Nawabu in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 23 Oct 2009, 4:36 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •