Checkbox and Radio Lists

  • I have a simple example form that is not quite working with the submits and loads.
    The reason is that it doesn't handle lists of radios or checkboxes. Lists being several sharing the same name. I am doing this with YUI bridge. I don't know if the others handle this better. YUI is after all responsible for parsing the forms and it doesn't do very well in this case. Maybe Extjs can make up for this. Maybe I should switch to a different base library. Or maybe I am off my rocker. Let me know.

    I have attached the files for replicating this problem in a zip.

    Also there is a load.jpg (actually is a gif the manager changed it ?)
    this shows the data received from the test.php file and how it was handled by the form.
    it wasn't
    radio: 2 was ignored.
    radio: on would have been accepted.
    check '1,3,4' would be a nice feature.

    save.jpg (actually gif)
    shows the data being submitted to the php
    check: 3
    check: 1
    check: 4
    maybe this should be
    check: '3,1,4' ???

    For formatting it would be nice to make the ":" disappear if no label is used and shift it left.

    Nice work thus far!


  • The way I would do it is give each field a unique dataIndex (or id) and pass them in exactly how you want them loaded.


  • I worked out a solution...

    Goto the examples forum

    http://extjs.com/forum/showthread.php?p=22973#post22973


  • I don't know, if you have 100+ checkboxes it might be easier to supply data:

    {success:true, data:[{id:'checks', value:['1','2','4','7','13','64','77','99']}]}

    as opposed to:

    {success:true, data:[
    {id:'checks1', value:'on'},
    {id:'checks2', value:'on'},
    {id:'checks3', value:'off'},
    {id:'checks4', value:'on'},
    {id:'checks5', value:'off'},
    {id:'checks6', value:'off'},
    {id:'checks7', value:'on'},
    {id:'checks8', value:'off'},
    {id:'checks9', value:'off'},
    {id:'checks10', value:'off'},
    {id:'checks11', value:'off'},
    {id:'checks12', value:'off'},
    {id:'checks13', value:'on'},
    {id:'checks14', value:'off'},
    {id:'checks15', value:'off'},
    {id:'checks16', value:'off'},
    ...
    {id:'checks64', value:'on'},
    {id:'checks65', value:'off'},
    {id:'checks66', value:'off'},
    {id:'checks67', value:'off'},
    ...

    {id:'checks77', value:'on'},
    {id:'checks78', value:'off'},
    {id:'checks79', value:'off'},
    {id:'checks80', value:'off'},
    ...
    {id:'checks99', value:'on'},
    {id:'checks100', value:'off'},
    ]}

    There first solution automatically turns the other checkboxes off.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Checkbox and Radio Lists , Please add it free.