0

I’m looking for a pointer in the right direction to research this because my GoogleFu just isn’t cutting it.

I’m on EE2 (hopefully to be upgraded to 5 soon…), with Freeform, and I have a form that, based on the value of one of the fields, I want to send the user to one of two different pages after they submit the form.

The form is a “do you qualify” form for a service, I want to check a field in the form to determine eligability, if eligable they are sent to one page, if not they are sent to another

I’m very new to EE, and web design in general. But the boss gets what the boss asks for!

1

It sounds like what you need is a conditional to set the value for the return parameter for your freeform tag.

Hard to say more without more information on what you are trying to do / what your template looks like and knowledge of the versions of EE and Freeform you have installed. But roughly something like this...

{exp:freeform:form 
    return="
       {if viable_form}{path='group/template_1'}
       {if:else}{path='group/template_2'}
       {/if}
    "
     ... other parameters ... 
}
... form tags ...
{/exp:freeform:form}

Replace viable_form with some construction that returns true if your form / application is viable.

Replace group/template_1 with where ever you want viable forms to redirect to, and group/template_2 with where ever you want the rest to go.

HTH

| improve this answer | |
  • Basically, the user selects their state from a drop down with all the states. If the user selects WI, MN, or IA, they are sent to one page when they submit the form. If the select any other state they go to another page when they submit the form. – user10602 Aug 24 at 12:14
0

Another approach would be to evaluate the form result on the return page template and redirect depending on the value. Something like this:

{if state == "WI"}
  {redirect="path/to/wi"}
{if:elseif state == "MN"}
   {redirect="path/to/mn"}
{if:elseif state == "IA"}
  {redirect="path/to/ia"}
{if:else}
  Thanks for your submission
{/}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.