Custom Fields
Support MB Frontend Submission Connecting Related Custom Post Types With Frontend Form

  • Creator
  • #19246
    Resolved Tobias Fueter

    We are running a dog shelter. I am building a website where our 'doctors' (users) can browse 'dogs' (custom post type 1) on the dogs archive page in the front end.

    With a form on the single page of the dog, the doctors should now be able to add a new 'medical report' (custom post type 2).

    This new 'medical report' entry should then be 'attached' to the dog. So a relationship between the dog and the medical report should be created when saving the form.

    This allows our doctors to look for a dog in the front-end, create a new medical report for that dog and attach it to the dog. I then can show all medical reports related to a dog on the dog's single page.

    I am aware of the 'MB relationship plugin'.

    But I don't know how to create a relation between the two custom post types 'dog' and 'medical report’ and then use a frontend form, so it automatically creates a relationship between the two entries.

    THX for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #19252
    Long Nguyen

    Hi Tobias,

    Thank you for contacting us. Hope you are well today.

    The extension MB Relationships supports to create the relation in the backend. In the frontend submission form, thank you for the idea, I'm going to discuss with the developer team and create a request feature to support relationship in the frontend.

    Have a nice day.

    Long Nguyen

    Hi Tobias,

    Each relationship meta box has an ID: {$relationship_id}_relationships_from and {$relationship_id}_relationships_to. You can include these IDs in the form shortcode to show it on the front end.

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