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.

Conditional Redirect

  1. Perhaps this should be a feature request, not really sure, but I think I know what I need to do, but I want to get some guidance.

    I am in the planning stages of setting up a VERY basic form that just gets someone's name, email address, and telephone number. They will then also pick a date. I am looking to do a conditional redirect based on date. I am going to do a really simple booking form from it. If the date is already booked, I want to redirect them to a "sorry the data is full" and if it is available, I want to show them more info and invite them to ask for me info and have another form there with more info for them to fill out. Is this my best approach? Would I just repeat the case yes/break blocks for each date that I want to show as booked?

    http://forum.gravityhelp.com/topic/terms-of-conditions#post-2046

    Posted 14 years ago on Saturday January 9, 2010 | Permalink
  2. What data do you plan on querying in order to determine if the date is available or not?

    Posted 14 years ago on Sunday January 10, 2010 | Permalink
  3. Well I figured I would have to manually add each date to the php code. I'm not sure honestly.

    Posted 14 years ago on Sunday January 10, 2010 | Permalink
  4. If that is the case you could do it with a custom confirmation page. Use a custom confirmation page and pass the form data to it via querystring. Have the custom confirmation page read the data and determine whatever it needs to determine and then display a message to the user.

    Custom confirmation pages are setup in the Form Settings under the Confirmation tab. You can setup a custom query string to pass data to this confirmation page and then do whatever you need to do with it from that page.

    Posted 14 years ago on Monday January 11, 2010 | Permalink