1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    49
    Vote Rating
    0
    zakif is on a distinguished road

      0  

    Default Submit Combo Box Value Into Text Area

    Submit Combo Box Value Into Text Area


    I have one combobox (Ext.form.ComboBox) and one textarea (xtype:'textarea',) inside a form window.

    Whenever the value inside combobox is selected, the value should submitted and filling the text area.

    I realize there is "select" method on combobox. But how to realize that functionality to transfer the selected value into text area.

    How to do that?

    Thanks in advance.

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      1  

    Default


    Hi,
    Try below code:
    Code:
                         xtype: 'form'
                        , items: [
                            {
                                xtype: 'combo'
                                , fieldLabel: 'Combo'
                                , name: 'combo'
                                , typeAhead: true
                                , triggerAction: 'all'
                                , lazyRender: true
                                , mode: 'local'
                                , store: {
                                    xtype: 'arraystore'
                                    , data: [
                                        ['Value01', 'v01'],
                                        ['Value02', 'v02'],
                                        ['Value03', 'v03'],
                                    ]
                                    , fields: ['display', 'value']
                                }
                                , valueField: 'value'
                                , displayField: 'display'
                                , listeners: {
                                    select: function () {
                                        this.nextSibling().setValue(this.getRawValue());
                                    }
                                }
                            },
                            {
                                xtype: 'textarea'
                                , fieldLabel: 'Text Area'
                                , name: 'textArea'
                            }
                        ]
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Jul 2011
    Posts
    49
    Vote Rating
    0
    zakif is on a distinguished road

      0  

    Default It's work!

    It's work!


    Thanks a lot, sword-it. It's just work. Many many thanks.

    But, how to extend the functionality, so the textarea can filled by multiple value from selected combobox? Because for now, the text area only receipt only one selected value.

    Thanks in advance.

  4. #4
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      1  

    Default


    Hi!

    Try This:-

    Code:
     listeners: {
          select: function () {
               var textArea=this.nextSibling()
                 ,textAreaValue=textArea.getValue()
                 , comboValue=this.getValue()
                 ,newValue=textAreaValue.concat(comboValue);
                 textArea.setValue(newValue);
          }
      }
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  5. #5
    Sencha User
    Join Date
    Sep 2013
    Posts
    14
    Vote Rating
    1
    jairam1204 is on a distinguished road

      0  

    Default


    Hi Sword,

    similar way i want in tree,
    submit tree value into textarea.

    Thanks
    Jayaram

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi