1

        $fieldset->addField('media_gallery', 'note',
        [
            'label' => '',
            'title' => __('Media Gallery'),
            'name'  => 'media_gallery',
            // 'required' => true,
            'text'      => $this->getContentHtml(),
        ]
    );

    $fieldset->addField('media_gallery_mobile', 'note',
        [
            'label' => '',
            'title' => __('Media Gallery For Mobile'),
            'name'  => 'media_gallery_mobile',
            // 'required' => true,
            'text'      => $this->getContentHtml(),
        ]
    );

I have two fields like this in form, how can I save 2 different photos, hope anyone help me. Thank you.

  • This all depends on how the extension has been built, as if it was specifically made for a single image then the upload functionality may be coded to only use the media_gallery variable if that is the case you would either need to change it to allow any variable that is posted or create new upload functionality that will allow you to upload a mobile image – Dava Gordon Aug 19 at 7:19
  • can you give me an example? Thank you. – MichaelHa Aug 19 at 9:49
  • Rather than reinvent the wheel please look at magento.stackexchange.com/questions/184731/… for reference – Dava Gordon Aug 19 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.