1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    9
    Vote Rating
    0
    pawan.v.jadhav is on a distinguished road

      0  

    Question Submit HTML Form Using ExtJS

    Submit HTML Form Using ExtJS


    Hi,
    I just started using extJS in my project.
    Can anyone tell me how to submit existing form using ExtJS.
    I am using Panel and Layout so submit should be AJAX not a normal submit.

    e.g. my form is like.
    <FORM action="controller" method="post">

    <input type="text" name="textName">
    <INPUT type="checkbox" name="chkCategory">
    <INPUT type="checkbox" name="chkCategory">
    <INPUT type="checkbox" name="chkCategory">
    <INPUT type="checkbox" name="chkCategory">
    </FORM>

    I want to submit this form using ExtJS Action Load and Submit is this possible? on server side i should get textName and chkCategory value.

    Is it possible to add existing html fields into ExtJS FormPanel

    Regards,
    Pawan

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    You will have to create the Ext.form.Fields from the existing input fields usnig the applyTo config.

    Then create a BasicForm from your existing form element, add the Fields to it, and off you go.

    (really though, you should not be using any HTML at all, your document body should be totaly empty)

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    9
    Vote Rating
    0
    pawan.v.jadhav is on a distinguished road

      0  

    Question


    i.e. we can add existing html element into form using applyTo...is it?

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes, applyTo "converts" an existing input field into an Ext.form.Field.

    You can then add them to the Ext.form.BasicForm that you create from your existing <form> element.

  5. #5
    Ext User
    Join Date
    Jun 2008
    Posts
    12
    Vote Rating
    0
    VishalKulkarni is on a distinguished road

      0  

    Default


    Can u please give an example...

  6. #6
    Ext User
    Join Date
    Jun 2008
    Posts
    9
    Vote Rating
    0
    pawan.v.jadhav is on a distinguished road

      0  

    Question


    what about the performance of ExtJS using AJAX form submit?
    if i have tree with thousands of node and checkBoxes in FormPanel and i want selected checkBoxes on server side.


    I am trying to use Layouts in My project.
    How standard submit will help me to load /submit/ unload Panels (same as target in frameset)..

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    thousands??? Really? Thousands? How can that be good UI design?

  8. #8
    Ext User
    Join Date
    Jun 2008
    Posts
    9
    Vote Rating
    0
    pawan.v.jadhav is on a distinguished road

      0  

    Question


    Tree with checkBoxes can have that much leaf+parent category

  9. #9
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    OK, if you use an Ext.tree.TreePanel which does lazy loading, and lazy rendering it should be alright because a user will surely never expand all 10,000 nodes, so submitting it shouldn't be too bad.

  10. #10
    Ext User
    Join Date
    Jun 2008
    Posts
    9
    Vote Rating
    0
    pawan.v.jadhav is on a distinguished road

      0  

    Question


    OK... Is there any way to use standard submit if i am using Panels and Layout...like from this panel i am submitting one form and updating different panel using forward..

    i think we can not...

Thread Participants: 2