Results 1 to 3 of 3

Thread: add input into form

  1. #1

    Exclamation add input into form

    Hi,
    I would like add an input in my form in a listeners

    Code:
    var fp             = new Ext.FormPanel({
           id:'fp',
           fileUpload    : true,
    .......
    ........
    .......
    new Ext.form.ComboBox({
                                allowBlank        : true,
                                displayField    : 'model_name',
                                emptyText        : 'Aucun',
                                fieldLabel        : 'Le model',
                                hiddenName        : 'idmod',
                                id                : 'modal_fo_upload',
                                name            : 'modal_fo_upload',
                                minListWidth    : 220,
                                mode            : 'local',
                                resizable        : true,
                                reviewField        : false,
                                editable        : false,
                                selectOnFocus    : true,
                                store            : models_store,
                                typeAhead        : false,
                                triggerAction    : 'all',
                                valueField        : 'id_model',
                                listeners: {
                                    'beforeselect': function(){
                                        return add_input(Ext.getCmp('file_name').getValue(),fp);
                                 }
                           }
    in the function i add the new input
    Code:
    function add_input(mask,form)
    {
        alert(form);
        var tir = new Ext.form.TextField({
                id            : 'tir',
                width        : 200,
                fieldLabel    : 'sdfdsdfmmmmmmmmm',
                name        : 'tir'
            })
        form.add(tir);
        //alert('verification avec le mask');
    }
    
    it dont work
    please help !!

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    stop using alerts to develop.

    try form.doLayout() after the form.add()

  3. #3

    Default resolved

    thanks jgarcia
    it works

Posting Permissions

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