1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    5
    Vote Rating
    0
    moimoibis is on a distinguished road

      0  

    Default Unanswered: submit form problem

    Unanswered: submit form problem


    Hello,
    I have a problem with a form. My form have 3 fields; a text one, a date picker, and a select field.
    When I click on the submit button, only the text field is submitted and I've no information about the 2 others fields.

    Here is my code :

    Code:
    Ext.application({    name: 'Filariane',
        
        launch: function() {
    
    
    	 Ext.regModel('villes', {
    	        fields: [
    	            {name: 'text', type: 'string'},
    	            {name: 'value', type: 'integer'},
    	        ]
    	    });
    
    
    
    
    	    Ext.create('Ext.form.Panel', {
     
    	        requires: [
                'Ext.field.DatePicker',
                'Ext.field.Password',
                'Ext.field.Select'
        
                ],
     
     
        fullscreen: true,
        url: 'hello.html',
        method: 'get',
        layout: 'vbox',
        standardSubmit: 'true',
        items: [
            {
                xtype: 'titlebar',
                dock: 'top',
                title: 'Ajout d\'un voyage'
                
            },
            {
                xtype: 'fieldset',
                title: 'Ajoutez un voyage',
                id: 'formajoutVoyage',
                
                items: [
                    {
                        xtype: 'selectfield',
                        id : 'typevoyage',
                        label: 'Type de voyage',
                        options:[
                                 {
                                     text:'option1',
                                     value:'1'
                                 },
    							 {
                                     text:'option2',
                                     value:'2'
                                 }
                                 ]
                    },
    				 {
                        xtype: 'textfield',
                        name : 'Id',
                        label: 'Identifiant',
                        placeHolder:'Compris entre 3 et 20 caractères'
                    },
    				{
                        xtype: 'datepickerfield',
                        name : 'DateNaissance',
                        label: 'Date de naissance',
                        destroyPickerOnHide:true,
                        dateFormat: 'd/m/Y',
                        value:new Date(),
                        picker:{
                            yearFrom:1900                        
                         }
                    }
                    
                ]
            },
            {
                        xtype:'panel',
                        defaults: {
                            xtype: 'button',
                            style: 'margin: 1em',
                            flex: 1
                        },
    
    
                        layout: {
                            type: 'hbox'
                        },
                        items: [
                        {
                            text: 'Valider',
                            ui: 'confirm',
                            handler: function() {
                            this.up('formpanel').submit();
                            }
                        }
                        ]
                    }
        ]
    });
    
    
        }
    });
    Can you help me please

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    5
    Vote Rating
    0
    moimoibis is on a distinguished road

      0  

    Default


    Please someone

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    5
    Vote Rating
    0
    moimoibis is on a distinguished road

      0  

    Default


    Anyone