G
G
Grigory Vasilkov2016-02-05 21:44:43
HTML
Grigory Vasilkov, 2016-02-05 21:44:43

How to make a form inside a table without creating multiple tables?

How to make the following thought cross-browser:

<table>
  {foreach items as item}
    <form>
      <tr>...content...</tr>
      <input name="id" value="{item.id}"
    </form>
  {endforeach}
</table>

As far as I know, form can be used as an inline element - if it is inserted into the table code, it will be taken out of bounds - that is, only inside the TD element.
Of course, you can change the PHP code and the entire structure, but for now I’m wondering if there is such a possibility

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Bukharev, 2016-02-05
@evgenybuckharev

<table>
<form>
  {foreach items as item}
      <tr>...content...</tr>
      <input name="id" value="{item.id}"
  {endforeach}
</table>
</form>

Putting a form in a loop is not an ice option, although here you need to look at the context of the task

G
Gregory, 2016-02-05
@TMGLUK

Why not wrap the table in a form?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question