1

I am not using the UI component.

And I want to convert the below code in Form.php

<fieldset>
 ...
 <field name="imageUploaderExample" formElement="imageUploader">
 <settings>
 <notice translate="true">Some notice.</notice>
 <label translate="true">Image Uploader Example</label>
 <componentType>imageUploader</componentType>
 </settings>
 <formElements>
 <imageUploader>
 <settings>
 <allowedExtensions>jpg jpeg gif png</allowedExtensions>
 <maxFileSize>2097152</maxFileSize>
 <uploaderConfig>
 <param xsi:type="string" name="url">path/to/save</param>
 </uploaderConfig>
 </settings>
 </imageUploader>
 </formElements>
 </field>
 ...
</fieldset>

Please suggest.

I need to add multiple uploads in Magento Admin Form not in the UI component.

Viral Patel
1,1001 gold badge8 silver badges17 bronze badges
asked Dec 27, 2021 at 11:30

1 Answer 1

0

Magento support available when you use with UI Component

<field name="restorent_images">
 <argument name="data" xsi:type="array">
 <item name="config" xsi:type="array">
 <item name="dataType" xsi:type="string">string</item>
 <item name="source" xsi:type="string">geolocation</item>
 <item name="label" xsi:type="string" translate="true">Image Of Restorent</item>
 <item name="visible" xsi:type="boolean">true</item>
 <item name="formElement" xsi:type="string">imageUploader</item>
 <item name="previewTmpl" xsi:type=""string"">Magento_Catalog/image-preview</item>
 <item name=""elementTmpl"" xsi:type="string">ui/form/element/uploader/uploader</item>
 <!-- <item name="isMultipleFiles" xsi:type="boolean">true</item> -->
 <item name="dataScope" xsi:type="string">image</item>
 <item name="uploaderConfig" xsi:type="array">
 <item name="url" xsi:type="url" path="ranosys_giolocation/index/upload"/>
 </item>
 </item>
 </argument>
 </field> 
answered Jan 10, 2022 at 2:08

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.