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.

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> 

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.