Results 1 to 5 of 5

Thread: ComboBox question ...

  1. #1

    Default ComboBox question ...

    Hello all, I have a problem witch combo boxes. I have a form for submitting some data and this form working but combobox values not posted correctly. For example when i select a Class names 1. Class 2. Class etc. This combobox value need to post my url 1,2,3 ...
    but my post value is Pre.Class 1. Class etc..

    How can i solve this problem ?

    Thank you..

    Here is My Codes
    PHP Code:
    .....
    var 
    classses  = [
         [
    '0''Pre.Class']
        ,[
    '1''1. Class']
        ,[
    '2''2. class']
        ,[
    '3''3. class']
        ,[
    '4''4. class']
        ,[
    '5''5. class']
        ,[
    '6''6. class'
        ];

    var 
    ClassStore = new Ext.data.SimpleStore({    fields: ['classNumber''classDescription'],data classses}); // end Store

    var addCourseForm = new Ext.form.FormPanel(
                    {
    .....

    , new 
    Ext.form.ComboBox({
        
    fieldLabel 'Course Classses'
        
    ,name:'courseC'
        
    ,emptyText:'Please Select a Class'
        
    ,selectOnFocus:true
        
    ,store :  classStore
        
    ,displayField:'Description' 
        
    ,mode'local'
        
    ,triggerAction'all'
        
    ,width 50
    }) 

  2. #2
    Ext User
    Join Date
    Mar 2008
    Location
    Houston, TX
    Posts
    148

    Default

    I dont understand what you are asking...

    Please provide an example of the POST you are getting and the POST you want...

    Thanks

  3. #3

    Default

    Sorry my English

    i'm trying explain again ...

    i have a combobox in my Ext.form.FormPanel . i create this combobox dynamically. My form panel working good.But my problem is combobox's post value. Normally html selectboxes return "value" tag value. For Example
    ....
    <select id="myid" name="mySelect">
    <option value="1">First </option>
    ...

    </select>
    ....
    when we select "First" option and submit mySelect value = 1.

    So i want to POST Ext.form.Combobox "value" tag value.Not displayField value.

    when my Ext.form.Formpanel submitting, combobox value return display value but i dont want return
    display value. For example when i was select 1.Class option in my combobox it must POST 1
    not '1.Class'.

    maybe i can explain this problem..

    thanks again..

  4. #4
    Ext User halkon_polako's Avatar
    Join Date
    Nov 2007
    Location
    Barcelona
    Posts
    193

    Default

    Try defining valueField and hiddenName properties (also check the displayField value):
    Code:
    ...
    ,displayField:'classDescription'
    ,valueField:'classNumber',
    ,hiddenName:'courseC'
    ...

  5. #5

    Default

    Thanks....
    it works perfectly

Posting Permissions

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