Custom Fields
Re-Envisioned
Support MB Frontend Submission rwmb_frontend_after_process set static value

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 8 months, 2 weeks ago.

  • Creator
    Topic
  • #13572

    knms5525
    Participant

    I’m using rwmb_frontend_after_process to assign a post_title like this:

    $wpdb->update( $wpdb->posts, array( 'post_title' => $NAME ), array( 'ID' => $post_id ) );

    BUT i also need to assign a value to a separate metabox field at the same time. How can I do this?

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #13609

    Anh Tran
    Keymaster

    Hi,

    If you use rwmb_frontend_after_process, then all the data are already processed. To assign a value to another field before it’s processed, I think you need rwmb_frontend_before_process hook. Then you can modify the $_POST array to change the other field’s value.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.