Custom Fields
Re-Envisioned
Support General Combine multiple custom fields into one

  • Creator
    Topic
  • #28899
    ac
    Participant

    Hi, I'm new to metabox, I would like to know if the following scenario is possible.

    custom field 1 = https://siteurl.com
    custom field 2 = /submit
    custom field 3 = 30

    custom field 4 = custom field 1 + custom field 2 + custom field 3 = https://siteurl.com/submit/30

    Please kindly let me know which plugin or tool I should use inside metabox.

    Thanks so much!

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #28903
    Long Nguyen
    Moderator

    Hi ac,

    Thank you for getting in touch.

    Currently, there is no field that grabs values of other custom fields to use as its value. When outputting the value, you can just concatenate the value of 3 fields into one.

    For example:

    $value1 = rwmb_meta( 'custom_field_1' );
    $value2 = rwmb_meta( 'custom_field_2' );
    $value3 = rwmb_meta( 'custom_field_3' );
    echo $value1 . $value2 . $value3;
    
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.