• 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: Use submit button to redirect

Use submit button to redirect 11 years 6 months ago #25401

I know how to do the simple redirect, but that's not what I want. I've set up a form for users to select the model of their motorcycle. So the form will initially load with just one field showing "Make". Harley Davidson and Victory have Model, then year selections - all other Makes can go straight to the product page of the shop.

All fields, including submit buttons, are hidden by conditions initially. Once the user has selected enough a submit button appears - there are 6 different products so I have 6 Submit buttons (obviously only one at a time shows).

I want to be able to assign a redirect URL to the submit button. Failing the ability to do that (don't see why I can't but anyway) I guess I'll just use radio buttons and use the method described here - www.rsjoomla.com/support/documentation/v...sers-selection-.html. IMHO not quite as elegant as my proposed solution but still workable.
The administrator has disabled public write access.

Use submit button to redirect 11 years 6 months ago #25404

  • octavian
  • octavian's Avatar
  • NOW ONLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Using 6 different submit buttons in a form is a bad idea. There's no way to tell from which button the form was submitted. This is also the reason why you won't see forms with more than one submit button throughout the web.
You can use a Return URL and setup a placeholder that will redirect the user to the appropriate page, eg. www.domain.com/index.php?option=com_some...}&model={Model:value}
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Use submit button to redirect 11 years 6 months ago #25411

I'm not sure you quite grasp what I want. I'm not submitting any form so I don't care about knowing what submit button was clicked. I only want to redirect to an internal URL (a product page) when the button is clicked. No email is sent and no data is written to the DB. All I'm using the form for is to determine what Make/Model?year of motorcycle the user has and redirect them to the correct product for it.

As there could be potentially 3 pieces of information, I don't understand how I set up the placeholder, nor where any of that code goes.
The administrator has disabled public write access.

Use submit button to redirect 11 years 6 months ago #25413

  • octavian
  • octavian's Avatar
  • NOW ONLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Why don't you create 6 links (Free Text field and then fill in the HTML code for the link, eg.:
<a href="harley-davidson/2003-model.html">Click here</a>
instead of using buttons?

Or 6 buttons (if they must be buttons) that redirect the user (through Javascript) to a certain page, eg:
onclick="document.location.href = 'harley-davidson/1996-model.html';"
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Use submit button to redirect 11 years 6 months ago #25414

DOH!!! Never thought of using free text - that will work. I would prefer buttons though. DO I still use free text and the <button></button> syntax?
The administrator has disabled public write access.

Use submit button to redirect 11 years 6 months ago #25416

  • octavian
  • octavian's Avatar
  • NOW ONLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
You can also use a "Button" field and in the Additional Attributes area just paste the "onclick" code from my earlier reply.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Use submit button to redirect 11 years 6 months ago #25426

Thanks - figured it out.
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!