[SOLVED] How to conditionally use redirect plugin for form with 'add option in front end' set to yes

chozma

Member
Hi guys,

Hope you are all doing well, it's been a while since I've been in touch.

I would like a little advice on how to go about achieving something...

I have a bunch of forms for which I have added the redirect plugin. These forms can be directly accessed from the menu and I have found that without a redirect, on save you end up back at the page from which you selected the menu option. Very often this page is completely irrelevant to the form. I'm sure this is the reason why you came up with the redirect plugin in the first place!

Some of these forms have dbjoin elements in them and these fields are set to yes for the 'add option in front end' bit. So you get the little plus sign next to the field in the form.

The problem is that if you add an option on the fly using the 'add option in the front end' button when you save that pop-up form the pop-up form stays open and redirects you to the page set in the redirects plugin. From my perspective it rather breaks the beauty of the 'add option in front end'.

I get why it does that and I suspect a way to solve this is by using the 'condition' field in the redirect plugin.

So what I am after is some advice on how to make use of that condition field so that when you are adding an option on the fly and you click save that redirect does not kick in and you get the normal behaviour of the 'add option in front end'. Eg the option is saved and pop-up form closes. Or indeed, any other method you suggest would be gratefully received as well.

Just not quite sure how to tackle this one to be honest!

Many thanks all,

Hannah
x
 
Ah, that sounds like a bug. I'll se if there's a way to detect that a form has been loaded from the front-end Add, and skip the redirect.

-- hugh
 
Bloody hell, Hugh that was a really quick response and fix!! I think you've broken some records there. Thanks very much. :D

I'm going to do the update now and let you know how I get on in a couple of hours.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top