• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Multiple Submit Buttons - Different redirect URLs

Multiple Submit Buttons - Different redirect URLs 11 years 10 months ago #23807

Hello RS community -

I have a very simple form with two radio type selections, then two different submit buttons. I need to use the values in the redirect URLs, but the URLs need to be different for each button. Currently in PRO there is only one redirect option for the entire Form, on the Properties -> Form Info tab, and not by button.

Is there a work around to having a different redirect URL for my second button? Thanks
The administrator has disabled public write access.

Multiple Submit Buttons - Different redirect URLs 11 years 10 months ago #23842

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

You do not need to use 2 different submit buttons in order to redirect the form to a different URL. You can try the following approach, as explained here:

www.rsjoomla.com/support/documentation/v...sers-selection-.html

The example in the above article explains the usage of the "|" pipeline symbol. Used to split the radio group item into label and value. Making the value to not show in the frontend, thus using the value to add your URL, leaving the label as you desire.

In the end, the radio component placeholder is added within the "Return URL" field which will change based on the user's radio selection.
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.

Multiple Submit Buttons - Different redirect URLs 11 years 10 months ago #23870

Hello Adrian - Thank you for the reply, but I do not think I explained my problem correctly - I understand how the Redirect URL works.

However, in my form I have 2 Submit Buttons. These two submit buttons need to have different redirect URLS. Currently as the link you showed, there is only one option per form to direct All submit buttons to that one URL specified in the back end. Is there anyway to specify different redirect URLs for different submit buttons in the same form?
The administrator has disabled public write access.

Multiple Submit Buttons - Different redirect URLs 11 years 10 months ago #23881

  • anthony.burge
  • anthony.burge's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 3
I haven't tried this, but perhaps when you press submit you could fire off some javascript to set the value of a hidden(?) field which could then be used for the redirect.

Create a field with the name redirecturl. Then put something like this in the additional attributes for submit button1
onclick="document.getElementById('redirecturl').value=’www.redirecturl1.com’;


Put this in the additional attributes for submit button2
onclick="document.getElementById('redirecturl').value=’www.redirecturl2.com’;

Then in the return URL you could put {redirecturl:value}

REFERENCES
www.rsjoomla.com/support/documentation/v...-with-rsformpro.html
www.rsjoomla.com/support/documentation/v...sers-selection-.html
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!