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.

[resolved] Conditional form only appears using shortcode not using function call

  1. go4
    Member

    I have a form with a dropdown conditional field.
    When I use the shortcode in the page it appears and works OK.
    When I add a function call e.g. <?php gravity_form(1, false, false); ?> to a page template instead of the shortcode it does not display.

    The function call works if I remove the conditional form elements.

    It appears as though the javascript isn't being generating in the head of the page when a conditional form element is used with a function call in the page template. The form code is viewable in the page source but display is none.

    I have tried this on several different server environments.

    What do you think?

    Posted 10 years ago on Thursday July 1, 2010 | Permalink
  2. When calling the form via the function call, you have to manually enqueue the scripts (conditional logic, datepicker, etc.) and CSS by placing a short snippet in your functions.php file. You can find that at the bottom of the page here.

    http://www.gravityhelp.com/documentation/embedding-a-form/

    Posted 10 years ago on Thursday July 1, 2010 | Permalink
  3. go4
    Member

    Thanks Kevin for your answer. That makes perfect sense.

    As a suggestion could you add a link to the http://www.gravityhelp.com/documentation/embedding-a-form/ page in the admin Gravity Forms Help page as there is no mention about extra required code only "Add the following function call to your template" <?php gravity_form(2, false, false); ?>.

    Posted 10 years ago on Thursday July 1, 2010 | Permalink
  4. The Help page in the next release of Gravity Forms will be completely redesigned and will link to more support resources.

    Posted 10 years ago on Thursday July 1, 2010 | Permalink
  5. You're very welcome. As Carl mentioned, we've revisited the plugin help page to make it easier to get to the documentation. It's a work in progress of course, so we'll continually be working to improve it. Thanks for the suggestion.

    Posted 10 years ago on Thursday July 1, 2010 | Permalink

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