PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Get a form's fields in backend

  1. I'm trying to build a plugin that unites our non-standard credit card processing company with our GForms registration forms. I need to find a way to get the field names for a given form so I can select which ones will be assigned to the CC processor's variables (Amount1 <=> field_1.2, for instance). I could probably whip up something using $wpdb, but I'd really rather work with the GForms API, if there's a way to do that.

    Is there a simple function that I'm missing, that will allow me to do something like, say, this:

    $form_fields = gf_get_fields( $form_id );
    or even
    $form = new GravityForm();

    Thanks!

    Posted 13 years ago on Thursday December 13, 2012 | Permalink
  2. If you have not already resolved this, I think you are going to have to use $wpdb to get the information you need.

    Posted 13 years ago on Friday December 21, 2012 | Permalink
  3. Yeah, that's what I ended up doing. I figured I knew how to get what I needed with $wpdb, and if it later turns out that there's a native GForms way to do it, I can always clean up my code after.

    Thanks!

    Posted 13 years ago on Friday December 21, 2012 | Permalink
  4. You're welcome. Glad you made it work.

    Posted 13 years ago on Friday December 21, 2012 | Permalink