Duplicate output on front end from rwmb_the_value helper function in Oxygen

Support General Duplicate output on front end from rwmb_the_value helper function in OxygenResolved

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #23528
    SteveSteve
    Participant

    Hi,

    I've just started using Metabox.io and I've been trying to output the values from the Checkbox List custom field using the rwmb_the_value helper function.The only argument I'm passing is the field ID. I'm using Oxygen Builder and the values display perfectly well as list items in the builder however when viewed on the front end the list is rendered twice resulting in two identical lists. This may well be an Oxygen issues but has anyone else found this or is there something else I should be doing?

    Thanks

    #23529
    Long NguyenLong Nguyen
    Moderator

    Hi Steve,

    Could you please let me know how did you show the field value on the front end via Oxygen Builder? A shortcode or a function?

    Also, please share some screenshots when you edit the page/post with the Oxygen Builder, I will try to reproduce the issue on my local site.

    Refer to this topic: https://support.metabox.io/topic/https-url-of-single-image-original-size/

    #23533
    SteveSteve
    Participant

    Hi,

    I'm using the rwmb_the_value helper function via the Oxygen dynamic data input field, not a shortcode. The attached images show the function input field and the list rendered in the builder and the duplicated list on the front end.

    https://chilp.it/293b65b
    https://chilp.it/5781b04
    https://chilp.it/03dadf8

    Thanks

    Steve

    #23535
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Please try to wrap the helper function rwmb_the_value() inside a custom function by using the plugin Code Snippets. It will show only one list as well. Screenshots:
    https://share.getcloudapp.com/2Nu0l2jo
    https://share.getcloudapp.com/o0uqPkq8

    function get_checkbox_list() {
        rwmb_the_value( 'checkbox_list' );
    }
    #23539
    SteveSteve
    Participant

    Hi,

    That worked for the front end display and the list appears only once however, the list no longer displays in the Oxygen builder, did that happen with you also?

    Thanks

    Steve

    #23549
    Long NguyenLong Nguyen
    Moderator

    Hi,

    I also experience that. For the simple field, you can use the option Custom field/Meta Options to get the field value immediately in the Builder. Screenshot https://share.getcloudapp.com/xQuY6jQ2.

    For the cloneable field or the field that has the setting 'multiple' => true, you should use a custom function to show the field value in the Builder.
    https://docs.metabox.io/fields/checkbox-list/#settings

    #23556
    SteveSteve
    Participant

    Ok, thanks for the quick replies and help on this issue.

    Steve

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