cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2, custom widget, add parameter as textarea

Magento 2, custom widget, add parameter as textarea

I create a custom widget on magento 2, and I want to use a field for text as (textarea). I try to use:

<parameter name="text" xsi:type="textarea" visible="true" sort_order="3">

But I got this error: The QName value 'textarea' of the xsi:type attribute does not resolve to a type definition

 

How can I use a textarea on a widget field, on magento 2?

 

Thank you

1 REPLY 1

Re: Magento 2, custom widget, add parameter as textarea

Set the field you want to be a text area to type=block

<parameter name="text" xsi:type="block" required="true" visible="true" sort_order="3">
    <label translate="true">Text</label>
    <block class="Namespace\Modulename\Block\Adminhtml\Widget\TextField"/>
</parameter> 

See also: http://stackoverflow.com/questions/37345690/magento-2-custom-widget-add-parameter-as-textarea