Magento – Add input fields as grid structure in cms page edit form

adminadminhtmlcmsforms

I added a custom tab in cms page edit form. In custom tab I create a form, and now I want to add/append a template(some input fields in grid structure) in this form in custom tab as a fieldset of cms page edit form.

here are example of template structure:

…………………………………………………………

Textbox | checkbox | checkbox | checkbox

Textbox | checkbox | checkbox | checkbox

Textbox | checkbox | checkbox | checkbox

……………………………………………………….

Please help me how can i get done this task?
Thanks in advance.

Best Answer

Take a look at the way you can specify a custom option for a product (Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option) and the assigned template file (catalog/product/edit/options/option.phtml in adminhtml). Here you can see how to setup a row (var firstStepTemplate) that and the needed javascript to add/remove rows.