Get product title / slug

Support MB Frontend Submission Get product title / slugResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37290
    Marius DokoMarius Doko
    Participant

    Hello,

    I have a frontend form added in single-product template where users can create queries. Is it possible to get the product title and slug on the submission form?

    I have created 2 hidden fields but can't find out how to output these values in the Default Value field.

    Appreciate your help

    #37293
    Long NguyenLong Nguyen
    Moderator

    Hi,

    I don't know a way to get the post (product) object from the early hook like init because the filter rwmb_meta_boxes is run at the init hook with priority 20. If you want to process data after submitting the form, please use the form hook. Read more on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#hooks-1

    #37304
    Marius DokoMarius Doko
    Participant

    Hello Long,

    Okay thank you for your answer 🙂

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