I want to add field image upload, file upload pdf, textarea field, date field

How can I add these fields in custom templatefor custom product attribute.

I saw below link

Adminhtml - How to add custom template for custom product attribute

but how to add images, editor for textarea, calender for date field.

1 Answer 1


When adding your attributes via the installer script be sure to set the proper value for 'input':

$this->addAttribute('catalog_product', 'attribue_code', array(
    'input'         => 'textarea', //this makes the difference

to add images, you can use 'image', 'images', 'imagefile' or 'gallery', depending on what behaviour you want.

for calendar use 'date'-type.

for editor use 'editor'.

to get the wysiwyg-editor or the datepicker you might need to add the appropriate javascript libraries via your module's layoutfile too.

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.