I want to submit create,but I don't know how to get the whole of form data.I just can get the one by

I want to submit create,but I don't know how to get the whole of form data.I just can get the one by

zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

I want to submit create,but I don't know how to get the whole of form data.
I just can get the one by one input data,that's to trouble,if there are simple way to get from data,please tell me.
thank you,and forgive my very very poor English...

Replies

  • allanallan Posts: 63,175Questions: 1Answers: 10,409 Site admin

    Is this using Editor? If so, the data should be available in the $_POST parameter if you are using PHP.

    Allan

  • zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

    yeah! I'm using the Editor and using the java.
    I may say is not clear what I mean.
    I want to submit the form,such as the photo,I want to get the entrie from input ,not get the one of them.Is there any way to get the entire form?
    zlz

    3.png 20.9K
  • zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

    I want to get the entire form and submit it,It makes to easy,I have many page,and I can extract it

    4.png 14.1K
  • allanallan Posts: 63,175Questions: 1Answers: 10,409 Site admin

    I'm afraid I don't know Java myself, I couldn't say how to access the data that Editor submits. All I can say is that it submits the data as an HTTP POST with the format described here.

    Allan

  • zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

    I am trapped in the Client-to-server,I just want to know how to package the form data to server,an ajax request,maybe has nothing to do with PHP.
    I don't understand where write ajax,in the editor field or in the buttons submit?
    Anyway thanks a lot!!

  • allanallan Posts: 63,175Questions: 1Answers: 10,409 Site admin

    Editor will make the Ajax requires automatically itself (you can configure it using ajax). The data that it submits to the server is in the format I linked to above.

    Allan

  • zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

    Can you give me some example like ajax and data of client-to-server.
    I can not uderstand the example you give me..........

  • allanallan Posts: 63,175Questions: 1Answers: 10,409 Site admin

    If you go to any of the Editor examples (for example this one), just below the table you will see an "Ajax data" tab. That will show you want Editor sends to the server and what the server returns - live (i.e. you need to make an edit).

    Allan

  • zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

    I use the buttons and my ajax request write in the buttons.I use the very bother method to finish add and edit,fortunately,I have realized the function.now ,I have a new trouble...
    I want to get the dataTables id where rows I selected,but fnGetNodes I can't used it,because it's unfined.I use the table.rows().ids(),but I can;t get id I selected
    Below is a picture

    5.png 40.3K
    6.png 15.8K
  • allanallan Posts: 63,175Questions: 1Answers: 10,409 Site admin

    fnGetNodes is legacy - use rows().nodes() instead (see also the second top FAQ for why fnGetNodes would be undefined).

    Beyond that I'd really need a link to the page to understand why rows().ids() wouldn't be working.

    Allan

  • zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

    I deal with this problem!!rows().ids() get the all id,I can not use it get selected id.I write like this
    var ids = "";
    var selectData = table.rows( {selected:true} ).data();
    for(var i=0;i<selectData.length;i++){
    if(i==selectData.length-1){
    ids = ids + selectData[i].id;
    }else{
    ids = ids + selectData[i].id + ",";
    }
    }
    I'm first get the data I selected rows,and each it can be achieved.
    thanks you for answer,Allan

  • allanallan Posts: 63,175Questions: 1Answers: 10,409 Site admin

    Why not just use the following?:

    table.rows( {selected:true} ).ids();
    

    If that isn't working for you, I'd need a link to the page to be able to help.

    Allan

  • allanallan Posts: 63,175Questions: 1Answers: 10,409 Site admin

    You might need to set rowId to tell DataTables where to get the row id from btw.

    Allan

  • zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

    Yeah! I deal with my problem and I busy with other project recent day
    So I have not been recently on this discussion

This discussion has been closed.