Custom Fields
Support General Select a Gravity Form to assign to a CPT

  • Creator
  • #13226
    Mark Tenney

    I have a CPT that I’d like to be able to add a custom field to for a Gravity Form. I tried using the Post field type, but Gravity Forms don’t show up as a CPT. Is there some code I can add into a functions.php to make Gravity Forms available in the post field? Or is there a way to leverage MB relationships? Not sure what the best course of action is. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
  • #13231
    Mark Tenney

    Reading back over this post, I realize I might need to explain it better. Here’s what I want to accomplish:

    I have a post type called ‘connect-card’ that is geared toward quick interactions with users for churches. I have a page that displays the post listing in a card format here:

    So if a user wants to respond to any of these calls to action, they would tap into the ‘connect-card’ and then respond. I have three types of responses: Button, Form, and Redirect.

    The redirect card simply redirects to another page on the site or another external link.

    The button is similar to the redirect, but would present some information before they click on the button to respond.

    The form would be a Gravity Form. At this point, my users can insert the Gravity Form using the shortcode button on the content editor for the ‘connect-card’. I’d like to have a dropdown select field that would allow the post author to select the form from a list of forms available.

    Hopefully that offers a better explanation of what I’m trying to achieve. Thanks for the help!

    Mark Tenney

    Here’s a plugin I found that allows this functionality with ACF:

    Anh Tran

    Hi Mark, this looks like a custom field type. I found the Github repo above is useful and you can replicate it to work with Meta Box. This is the code to get list of forms and here is the tutorial on creating new field type.


    Hi Anh or Mark,
    I need to do something similar. I have a “Select Advanced” dropdown field that I would like to populate with specific Gravity Forms, based on the form id. I reviewed the above links but still a little confused.

    Here is what I have so fare.

    if ( class_exists( 'RWMB_Field' ) ) {
        class RWMB_GFSelect_Field extends RWMB_Field {
        $forms = RGFormsModel::get_forms(1,2,3);
        $options = array();
        foreach ($forms as $form) {
            $options[$form->id] = $form->title;
        return $options;

    Am I creating a new select advance field or just extending it and telling it to pull in the specific gf forms? Not understanding.

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
grid gear info copy caret-up caret-down trash