Forums

Redirect after submission not working

allanbeth 04 Feb, 2014
Hi All,

I am having a problem with redirecting after a form submission

The Set Up

I have a form that is displaying a load of data.

i have set up my own event called addMarket this event is called from a bootstrap modal window This modal window submit button fires the addMarket event to change a field in the datatable for the corresponding item. This all works fine the Modal window is opened and when i click the submit button it fires my event. i use the DB save to change the field (along with a hidden field with the item id, so it changes the info for the correct item)

I have added both the Redirect URL as i need to pass a parameter followed by the Redirect User (left blank)

Without the debugger on i get no redirect and the url in the address bar is the url and the event trigger (&event=addMarket). With the debugger on i can see that the redirect url link is there and when i click to follow it it takes me to the desired page with the correct parameters.

Why does it not work if i can see that it is setting the correct url in the debugger?

Any help would be appreciated

Kind Regards

Allan
GreyHead 08 Feb, 2014
Hi Allan,

I can't work out why this isn't working for you. The logic looks OK, though it may be that something glitches when you switch from the modal window.

You could try using the Joomla! redirect code in a Custom Code action instead
<?php
$app =& JFactory::getApplication();
$app->redirect('some_url');
?>

Bob
This topic is locked and no more replies can be posted.