cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 ui component file upload field name show in array

Magento 2 ui component file upload field name show in array

Hi Guys,

 

I create file upload field by using ui component, but field name file type name show as array event_data[event_homepdf].

How can I change field name only show event_homepdf not event_data[event_homepdf]?

<field name="event_homepdf">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">Event</item>
                    <item name="label" xsi:type="string" translate="true">Home PDF</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="formElement" xsi:type="string">fileUploader</item>
                    <item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
                    <item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
                    <item name="required" xsi:type="boolean">false</item>
                    <item name="uploaderConfig" xsi:type="array">
                        <item name="url" xsi:type="url" path="eventmanager/event/upload"/>
                    </item>                  
                </item>
            </argument>
        </field>

Any idea what I need to do?

 

Thanks

Sanjeev

1 REPLY 1

Re: Magento 2 ui component file upload field name show in array

File upload field name should be string not array