Responsive extension and form elements

Responsive extension and form elements

gyrocodegyrocode Posts: 126Questions: 6Answers: 30

I'm working on a solution for a problem where table with responsive extension contains form elements. In that case form element values are not preserved when page width changes. You can see the problem and potential solution in my article jQuery DataTables – Form inputs with Responsive extension or this answer on StackOverflow.

However it seems that my solution is far from perfect yet.

I was wondering if there is a better way to do it.

Replies

  • allanallan Posts: 61,432Questions: 1Answers: 10,048 Site admin

    Not really is the answer. Responsive uses the data for the source cell, not the nodes. So the form element information would effectively be lost when transitioning between them. A workaround is the only option until Responsive implements some kind of node moving method. I experimented with it a bit, but it proved to be really rather difficult, so its on the back burner for now.

    Allan

  • gyrocodegyrocode Posts: 126Questions: 6Answers: 30

    I noticed that hence the solution as could be seen from the article is to copy data back and forth, however I wasn't sure if that was the best one.

  • allanallan Posts: 61,432Questions: 1Answers: 10,048 Site admin

    Its really the only one at the moment (unless you fancy patching Responsive :-) ).

    Allan

  • gyrocodegyrocode Posts: 126Questions: 6Answers: 30

    Thanks, Allan. I will see whether patching Responsive is a better solution vs. stand-alone plug-in.

  • allanallan Posts: 61,432Questions: 1Answers: 10,048 Site admin

    Let me know if you have any questions about it. The problem I ran into what having the column widths be recalculated while elements were moved out. The back and forth was really slow.

    Allan

This discussion has been closed.