Custom Fields
Re-Envisioned
Support MB Elementor Integrator Image Select not showing from a Dynamic selection

  • Creator
    Topic
  • #27831
    Resolved dubiousmoot@gmail.com
    Participant

    Hello, as far as the initial selection it's working. I have an option of 2 images and the database is showing which image I have selected correctly.
    I have created a loop for Property Archives on a real-estate site.
    The dynamic selection is showing and I can pick that field but the image does not show.
    (If I simply select an image from the library it will show)

    Here is the code for the image select

    [
                    'name'       => __( 'Sales Person', 'your-text-domain' ),
                    'id'         => $prefix . 'sales_person',
                    'type'       => 'image_select',
                    'options'    => [
                        'image01' => __( 'http://mysite.ca/realestate400/wp-content/uploads/2021/04/female-1.png', 'your-text-domain' ),
                        'image02' => __( 'http://mysite.ca/realestate400/wp-content/uploads/2021/04/female02.png', 'your-text-domain' ),
                    ],
                    'save_field' => 1,
                ]

    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #27848
    Long Nguyen
    Moderator

    Hi,

    The image URLs are not accessible

    http://mysite.ca/realestate400/wp-content/uploads/2021/04/female-1.png
    http://mysite.ca/realestate400/wp-content/uploads/2021/04/female02.png

    Can you please change it to your site URL http://zentyx.ca/?

    http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female-1.png
    http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female02.png

    #27851
    [
                    'name'       => __( 'Sales Person', 'your-text-domain' ),
                    'id'         => $prefix . 'sales_person',
                    'type'       => 'image_select',
                    'options'    => [
                        'image01' => __( 'http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female-1.png', 'your-text-domain' ),
                        'image02' => __( 'http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female02.png', 'your-text-domain' ),
                    ],
                    'save_field' => 1,
                ]
    #27853

    I changed my url to Mysite.ca in the code block here. It's correct on the site

    #27873
    Long Nguyen
    Moderator

    Hi,

    Can you please share some screenshots of the issue? You can also follow the Debugging Information step to troubleshoot the issue https://metabox.io/support/topic/how-to-create-a-new-topic/.

    Let me know how it goes.

    #27915

    Hello Long, thanks for that info. I think this error info may help...

    Warning: Invalid argument supplied for foreach() in /home/zentyx/public_html/realestate400/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-elementor-integrator/src/Traits/Fields/Image.php on line 31

    Here is the set up with a simple image grab directly from the library
    With a direct selection from the Library

    And here is the set up with the metabox image select
    with the error

    Thank you so much for your time

    #27923
    Long Nguyen
    Moderator

    Hi,

    Thanks for your additional information.

    If you are using the Elementor page builder, please use another image field such as single_image. The field type image_select saves the value image01 or image02 in the database instead of image ID, so the Elementor cannot render the image based on that value.

    Get more details on the documentation https://docs.metabox.io/fields/image-select/#data

    #27940

    Okay, I'll set it up another way.

    Thanks for your time

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.