DataTable with Form inside every Table Row

DataTable with Form inside every Table Row

gpmattoogpmattoo Posts: 2Questions: 0Answers: 0
edited April 2011 in General
I was hoping that Datatable features (Sorting, Searching, Pagination etc) would work for the below HTML Table wherein i have a form inside every table row.
[code]



Company name
Address
Town






Emkay Entertainments
Nobel House, Regent Centre
Lothian





The Empire
Milton Keynes Leisure Plaza
Buckinghamshire





Asadul Ltd
Hophouse
Essex






Ashley Mark Publishing Company
1-2 Vance Court
Tyne & Wear






[/code]

I am seeing the following exception:
[code]jquery.dataTables.js 'length' is null or not an object on Line:719[/code]
I know this happens because i have the table data enveloped by a form. Wondering if there is a way to get it to work. Would highly appreciate any recommendation around the same.

Replies

  • allanallan Posts: 63,519Questions: 1Answers: 10,473 Site admin
    The HTML you are using isn't valid, a FORM tag can't be a child of a TR, and DataTables assumes valid HTML. Given that you only have one input field per row, can you just put the FORM tag into your last TD in each row? Just wrap it around the INPUT tag.

    Allan
  • gpmattoogpmattoo Posts: 2Questions: 0Answers: 0
    Thanks Allan! It was the problem of HTML being not valid!
This discussion has been closed.