1. #1
    Ext User
    Join Date
    Nov 2008
    Posts
    6
    Vote Rating
    0
    rencarl is on a distinguished road

      0  

    Default How to add checkboxes at a specific form place

    How to add checkboxes at a specific form place


    Hi,
    i want to add some checkboxes, generated dynamically, to a specific place in a form. I know how to add the checkboxes, but i don't know how to add them to e specific place.

    [code] var itemsTypeOfLodgings = [{xtype: 'label', text: 'Art der Unterkunft', cls:'x-form-check-group-label', anchor:'-15'}];
    var ajaxTypeOfLodgings = new Ext.data.Connection({});
    ajaxTypeOfLodgings.request({
    url: 'test.ajax.php',
    success: function(r, o){
    obj = eval(r.responseText);
    var len = obj.length;
    for(var x = 0; x < len; x++) {
    cb = new Ext.form.Checkbox({
    hideLabel: true,
    name: 'arrTypeOfLodgings[]',
    boxLabel: obj[x].boxLabel,
    value: obj[x].inputValue
    });
    frmVac.add(cb);
    }
    frmVac.doLayout();
    },
    failure: function(r, o){
    //alert('Fehler');
    },
    params: {action: 'getLodgings'}
    });

    frmVac = new Ext.form.FormPanel({
    id: 'frmVac',
    layout: 'form',
    labelWidth: 330, // label settings here cascade unless overridden
    frame:true,
    title: 'Suche',
    bodyStyle:'padding:5px 5px 0',
    width: 600,
    defaults: {
    width: 100,
    allowBlank:false,
    format: 'd.m.Y'
    },
    defaultType: 'datefield',
    items: [{
    xtype: 'numberfield',
    fieldLabel: 'Dauer des Aufenthalts',
    id: 'vacNights',
    allowBlank: true
    },{
    fieldLabel: 'Anreise',
    id: 'vacStart'
    },{
    fieldLabel: 'Abreise',
    id: 'vacEnd',
    allowBlank: true
    },{
    xtype:'fieldset',
    width: 600,
    checkboxToggle:true,
    collapsed: false,
    title: 'erweiterte Suchm

  2. #2
    Ext User
    Join Date
    Nov 2008
    Posts
    6
    Vote Rating
    0
    rencarl is on a distinguished road

      0  

    Default


    Ok, i can create my checkboxes before i render the form, it works, but it would be interesting for me how to add checkboxes somewhere in a large form, f. e. under a specific panel.

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    87
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You could use:
    Code:
    // Insert checkbox into panel
    panel.insert(position, checkbox);
    panel.doLayout();
    // Add checkbox to fields list.
    form.getForm().add(checkbox);

Thread Participants: 1

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