Custom Fields
Re-Envisioned
Support MB Settings Page Oxygen builder, get value from settings field in code block does not work

  • Creator
    Topic
  • #32698
    Resolved Majd Azar
    Participant

    Hello,

    I am a user of Oxygen Builder (v. 3.9).

    I have setup a settings page with some fields.

    I wanted to pull one field value inside a code block.

    Following your documentation I then simply pasted this code inside a code block:

    <?php 
    $value = rwmb_meta( $vardagar, ['object_type' => 'setting'], $oppettider ); 
    echo $value; 
    ?>

    But nothing got printed. Do you know why?

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

    Hi,

    You need to assign values to the variable $vardagar and $oppettider before, or pass them directly to the helper function.

    $vardagar = 'your_field_ID';
    $oppettider = 'your_option_name';
    $value = rwmb_meta( $vardagar, ['object_type' => 'setting'], $oppettider ); 
    echo $value;

    or

    $value = rwmb_meta( 'your_field_ID', ['object_type' => 'setting'], 'your_option_name'); 
    echo $value;
    #32712
    Majd Azar
    Participant

    Thank you for the help.

    There must have been some bug. I tried the helper function before and it didn't work. Now it seems to be working.

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