123 Posts
EclipseMedia
9 years ago
5
Topic

After someone submits a form, I would like them to be redirected to a URL based on a dropdown select in the form

Example

Simple Select (field)

Options are
Pay By Cheque
Pay Online by Credit Card

When form is submitted

If Pay By Cheque was selected, the user would be redirected to a URL I specified and same goes for if they select Pay Online by Credit Card.

Thanks

Get a VIP membership
123 Posts
EclipseMedia
8 years ago
4
Level 1

Anyone?

1283 Posts
Bucklash
8 years ago
3
Level 2

Hi Eclipse

I would add a conditional for a field, and probably use the custom plugin/field

See my answer on another post.

Or maybe get the field plugin to show the submit button relevant to the option chosen and have each submit set to the relevant url

Bucklash

154 Posts
WebOne
8 years ago
2
Level 3

You can do this with the Code Pack plugin - Afterstore (haven't tried field 42).

Check the value and set the config['url'] variable.

eg:

if ($fields['yourdropdown']->value == 'creditcard') {

$config['url'] = 'http://www.yoursite.com/creditcard' }

1283 Posts
Bucklash
8 years ago
1
Level 4

Smooth!

123 Posts
EclipseMedia
8 years ago
0
Level 5

Agree! Smooth! and it works perfect! Thank you. I had this plugin but never put 2 to 2 together :)

Get a VIP membership