Conditionally redirect based on form value - JW foundation/Total CMS


(Dan M) #1

I’m using Joe Workman’s Foundation theme and associated stacks. I also have Total CMS in the toolbox. I’m trying to create a form where one enters their email, then selects a location, next they are conditionally redirected based on their location choice. I’ve used Joe’s awesome Total CMS to pass link URL’s based on user input…thus creating a dynamic link that can change with input. I feel like I should be able to do something similar using the Foundation forms stack…but can not get it working. I was hoping to have a drop down with locations where the “value” of each location would be the URL to redirect to. Then I was hoping to pull that value (i.e. URL) into the link area in the forms stack “redirect upon success”. See fancy graphic for a visual :slight_smile: Any thoughts, short of custom PHP?


(scott williams) #2

Did you try putting the macro from the select field value into the redirect field?


(Dan M) #3

Hi scott…thanks. I might have tried that…frankly not sure (exactly what the form macro is) :slight_smile: What I did try was putting this {{formlocation}} which is the name of my drop down field into the set link field as the URL (much the same way I’ve used the Total CMS macros). But, no luck with that attempt. Maybe @zeebe or @joeworkman can bestow some magic on us :slight_smile:


(Dan M) #5

Scott thanks for the effort…I suspect you realized that I’m looking to conditionally redirect to a URL vs. redirect to an email recipient. It’s worth pointing out (for others who stumble upon this thread) that the conditional email recipient redirect does work quite nicely. Thanks again :+1:


(scott williams) #6

yes, thats why i deleted the answer, i’m playing with redirect now. I know you can do it with a custom post and a few lines of php


(Dan M) #7

I’m not versed in PHP at all…but certainly am not adverse to using it if that’s what it takes. Thanks for tinkering.


(Robert Ziebol 🖖🏼) #8

Hey Guys, just got back from our trip to Washington DC. Not sure I will get to anything until Monday, but I will see if Joe can pry himself away from the Sweden/Germany Game and reply here.

EDIT - OK, so my mistake, Joe was gone all weekend. Should get home sometime tonight. I will mention this thread to him, but he will probably not get to this until Monday.


(Joe Workman) #9

Like I metioned to your post on WS or maybe it was support email… This could be possible with some custom JS code. However, I don’t have time to assist you with that at this time. Sorry.


(Dan M) #10

Joe and team. Thanks for the continued quick responses, honest follow up and support. If I delve into the custom JS I’ll be sure to post any success here for all to see. Thanks to all for the input.