3

Is it possible to create a custom form element that can be used in widget instance creation?

Fields used in widgets is setup using widget.xml ,for example:

        <my_field>
            <label>My Field</label>
            <type>textarea</type>
        </my_field>

How can i replace textarea with a completely custom form element ?

1 Answer 1

1

What you need to do is replace textarea with a block representing your new element.

<type>your_module/widget_new_element</type>

The you can create a class Your_Module_Block_Widget_New_Element that extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element. Then depending on what you want your new element to do you can add customizations to this new block.

Your Answer

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

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