4

I'm making some custom module for magento and need backend settings for my custom entity. So far all was ok, I made a section through xml, made general CRUD actions and some settings that are implemented through tabs (like CMS ones). I included there some inputs, image fields and all works good. But now I need some field that will have arbitrary number of sets of fields and these sets should also have a type (like it's done in custom options in product settings). So my entity should have an arbitrary number of sets and each set have some. The type of set of fields describes what fields should be included to form, so the text will produce an input field and image will give file upload to user. After some looking to custom field files I see that it's implemented differently, making own phtmls. I suppose this won't fit as just a fieldset child, because it's even doesn't have setChild method.

Is somewhere in Magento the such field type that will support this kind of stuff, with arbitrary number of fields. Could it cause some problems with saving/loading it?

1 Answer 1

2

This isn't a default option in Magento but can be done with some custom coding. Please check this tutorial, if I'm understanding you correctly this should fit your requirements.

In the tutorial you will implement custom frontend rendering and translate it to a value that Magento can save in it's database using a backend model.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.