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.

Presale questions: Hooks/API, Add ons and multi-lingual forms

  1. Hi,

    This plugin looks really good. I can see where it would fit nicely in a lot of my projects. I have just a few questions before I whip out my credit card:

    1. Does the plugin provide hooks or an API that allow a developer like me to do additional processing to the submitted data before and after it is saved?

    2. What do the MailChimp and CampaignMonitor add-ons actually do?

    3. Is there a way to have two different forms insert their entries at the same place in the database?

    A little bit more about #3. I'm running a few multilingual sites. As far as I understand from reading the forums, the easiest way to have a form show up in many languages for the end user is to create one form for each language. Except in that case, the entries would end up spread out in the DB and the admin section. Is there any workaround for this?

    Thanks in advance

    Posted 14 years ago on Thursday September 30, 2010 | Permalink
  2. 1. Yes there are extensive hooks built into Gravity Forms so you can do all sorts of customizations with it by taking advantage of these hooks and filters just like you can with WordPress.

    2. The MailChimp and Campaign Monitor add-ons allow you to integrate any form with MailChimp and Campaign Monitor. It allows you t map form fields to their corresponding MailChimp or Campaign Monitor fields so that when a form is submitted on your site, data is passed to these services to add subscribers and data to your mailing lists with MailChimp and Campaign Monitor.

    3. Currently multiple forms cannot feed data to one forms entries. All form data is stored in the same location, however it is tied to a form id. Each form has it's own id. So right now if you have a form for each language, the entries are going to be tied to each individual form. They aren't spread out in the DB, they are stored in the same place... they are just tied to specific form.

    Posted 14 years ago on Thursday September 30, 2010 | Permalink
  3. Hi Carl,

    Thanks for the quick answers. #1 and #2 sound good. I kind of expected answer #3, but I think I can live with it. Maybe you could consider this for a future release? Some sort of "child forms" where entries all end up in the same place in the admin. This could solve the multilingual problem elegantly and allow other possibilites.

    Thanks again!

    Posted 14 years ago on Friday October 1, 2010 | Permalink
  4. We are going to look into how we can tackle the multi-language issue. WordPres doesn't handle it natively and most of the solutions for it such as WPML tackle it in a variety of ways. There is no standard way to handle it... but it's something we would certainly like to find a good solution for.

    Posted 14 years ago on Friday October 1, 2010 | Permalink
  5. I am currently using your forms in a (WPML) multilingual environment and it works perfect! 2 different forms, same content, different language and it all shows up neatly in the admin.

    I actually think that having two different forms works out fine as you can immediately see how many entries you have for each language...

    Posted 14 years ago on Tuesday November 2, 2010 | Permalink
  6. @senlin I also think a form for each language makes more sense that way you keep the entries separate in case you have different people responding for each language.

    Posted 14 years ago on Tuesday November 2, 2010 | Permalink
  7. Tzaddi
    Member

    What hook allows you to access data after the form is saved? Specifically I need to know the ID of the post (a custom post type in my case) created by the submitted form.

    Posted 13 years ago on Monday January 17, 2011 | Permalink
  8. Hi Zodzilla, you're probably looking for the gform_post_submission hook which passes the saved form data as an $entry object. Here is an example of the hook being used to modify the post content after submission:

    <?php
    add_action("gform_post_submission", "set_post_content", 10, 2);
    function set_post_content($entry, $form){
    
        //getting post
        $post = get_post($entry["post_id"]);
    
        //changing post content
        $post->post_content = "Blender Version:" . $entry[7] . "<br/> <img src='" . $entry[8] . "'> <br/> <br/> " . $entry[13] . " <br/> <img src='" . $entry[5] . "'>";
    
        //updating post
        wp_update_post($post);
    }
    ?>
    Posted 13 years ago on Monday January 17, 2011 | Permalink
  9. Tzaddi
    Member

    Perfect, that's the one I needed. Thanks David!

    Posted 13 years ago on Monday January 17, 2011 | Permalink