我有这个表格:
$form = new Varien_Data_Form();
$costsForm = $form->addFieldset('costs', array(
'legend' => Mage::helper('starmall_config')->__('Shipping costs')
));
$data = array();
$costsArr = Mage::helper("starmall_config")->getShippingWeightRateList();
for ($i=0; $i < count($costsArr); $i++) {
$data["ship_cost_" . $i . "_from"] = $costsArr[$i]["from"];
$data["ship_cost_" . $i . "_to"] = $costsArr[$i]["to"];
// 1st column
$costsForm->addField("ship_cost_" . $i . "_from", 'text', array(
'name' => "ship_cost_" . $i . "_from",
'label' => $costsArr[$i]["label"],
'class' => 'required-entry',
'style' => 'width:50px',
'required' => true,
));
// 2nd column
// how to add a new field on the same row in another column
// 3rd column
// how to add a new field on the same row in another column
// 4th column
// how to add a new field on the same row in another column
}
它看起来像这样:
我想在同一行添加多个输入字段。这可以在 Magento 1.7 中完成吗?