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.

Can a Gravity Form conditionally be removed from a page?

  1. gmw
    Member

    I am using Gravity Forms and the PayPal add-on for event registration. I would to be able to conditionally remove the form from the registration page and replace it with some text such "SOLD OUT".

    I was thinking that I could use the gform_paypal_post_ipn hook to update a counter in the database that would keep track of PAID registrations. Then I would create a template for the registration page where via PHP I could load the Gravity Form OR the"SOLD OUT" text depending on the value of the counter. Will this work? Would I just load the form via a shortcode? Not sure how to proceed. Thx for any direction.

    Posted 11 years ago on Monday April 15, 2013 | Permalink
  2. David Peralty

    Check out this tutorial written here - http://gravitywiz.com/better-inventory-with-gravity-forms/ it might give you what you want. Otherwise, you would have to use PHP on the page to do a test before the form shows... There are plugins to use PHP on WordPress pages.

    Something like:
    if counter => limit then
    show error
    else
    form embed
    end if

    Posted 11 years ago on Tuesday April 16, 2013 | Permalink