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.

Form tag not executing in widget?

  1. FEAST
    Member

    Hi there,
    I found that the standard form tag for pages wont execute in a widget or template:

    [gravityform id="3" name="Income Protection Comparisons" title="false" description="false" ajax="true"]

    Then I found this code which works in a template, but still not in a widget:

    <?php gravity_form($id=3, $display_title=true, $display_description=true, $display_inactive=false, $field_values=null, $ajax=true, $tabindex); ?>

    I'm placing the tag in a Text widget because the form needs to be embedded in some other html, hence I can't use the form widget...

    I'm using the Widget Controller plugin to assign the widget to certain pages.

    I REALLY hope there's a way to make this work!

    Many thanks in advance.

    (Btw - the salesforce integration feature is gold!! :)

    Posted 12 years ago on Thursday August 30, 2012 | Permalink
  2. It's possible your theme has not enabled shortcodes in widgets. You can add this code to your theme's functions.php to ensure that shortcodes are processed in widgets:

    [php]
    add_filter('widget_text', 'do_shortcode');

    Source

    PHP code will not be processed in a text widget but you can use a PHP widget. I use this plugin for that purpose all the time: http://wordpress.org/extend/plugins/php-code-widget/

    Finally, the Salesforce add-on for Gravity Forms was not created by us. Here is a link to the plugin page in case anyone is looking for it: http://wordpress.org/extend/plugins/gravity-forms-salesforce/

    Posted 12 years ago on Thursday August 30, 2012 | Permalink
  3. FEAST
    Member

    That fixed it! :D

    Thanks so much!

    Posted 12 years ago on Monday September 3, 2012 | Permalink
  4. You're welcome.

    Posted 12 years ago on Monday September 3, 2012 | Permalink

This topic has been resolved and has been closed to new replies.