/ / Wie können wir eine td in tr-Tag für eine zend_form hinzufügen? - PHP, Zend-Form

Wie können wir ein td in tr-Tag für eine zend_form hinzufügen? - PHP, Zend-Form

Ich frage mich lange Zeit.Ich bekomme keinen richtigen Weg für zend_form. Wie können wir ein td in einem zend_form in tr-Tag hinzufügen? Wie können wir dieses Problem im Rahmen von Zend lösen? jemand hilft mir bitte. es sieht wie folgt aus:

<table>
<tr>
<td><input type="checkbox" id="something"/></td>
<td><img src="/images/src"/></td>
<td><input type="text" id="something"/></td>
<td><input type="radio" group="justonegroup"/></td>
</tr>
</table>

Mein Code ist wie folgt:

          $pollAdd->setDecorators(array("ViewHelper",
array(array("data" => "HtmlTag"), array("tag" => "td")),
array(array("emptyrow" => "HtmlTag"), array("tag" => "td",                 )),
array(array("row" => "HtmlTag") , array("tag" => "tr","id"=>"trRowAdd"))));


$this->setDecorators(array(
"FormElements",
array("HtmlTag" , array("tag" => "table" , "class" =>"formTable")),
"Form"));

Antworten:

1 für die Antwort № 1

Verwenden Sie Formular senden setDecorators

Etwas wie ,

   $this->setElementDecorators(array(
"viewHelper",
"Errors",
array(array("data"=>"HtmlTag"),array("tag"=>"td")),
array("Label",array("tag"=>"td")),
array(array("row"=>"HtmlTag"),array("tag"=>"tr"))

),array("firstname","lastname"));

Form selbst wird das haben table HTML-Tag wie unten,

 $form->setDecorators(array(
"FormElements",
array("HtmlTag", array("tag" => "table")),
"Form",
));