Redirect form plugin: Append further data to url

mmystery

New Member
Dear all,

First, have a pleasant and happy new year!

I have created a form, where on submission it triggers conditionally the redirect form plugin, as shown:

Jump page:
Code:
index.php?option=com_content&view=article&id=107&Itemid=1094#XXX=YYY

Condition: Has some queries back to the DB, where the results from the form are evaluated. Now, I want to append a number that is derived from the evaluation done in the condition box. So I want to pass this number to YYY in the Jump page. How can I do this?

Thanks a lot,
Chris


NB: The form does not contain the number I want to pass to the jump page, it is derived.
 
Happy new year to you as well :)

I've not tried but this *might* work.....

In your PHP condition code add this:

PHP:
$myDerivedNumber = 6;
$formModel->_formData['yyy'] = $myDerivedNumber;

then set your jump page url to :

Code:
index.php?option=com_content&view=article&id=107&Itemid=1094#XXX={yyy}

that should replace {yyy} with 6.
 
Hello Rob,

thanks for the reply. I have tried what you said, even though it doesn't return anything. This is the result:

Code:
index.php?option=com_content&view=article&id=107&Itemid=1094%23clue{yyy}

It returns to the URL the placeholder itself... Is that possible? moreover, why the hash symbol (#) transforms to %23? It should stay that way to make it work, no?

Is there any possibility to debug this point? Or to find an alternative option?

Thanks!
 
I have also thought to load a php onAfterProcess, and as the values are already stored, to change the value on the form, so the redirect plugin (if executed after the php plugin onAfterProcess) will get the new value and return it on the URL.

You may see the code used:
Code:
$formModel->updateFormData("vid", '1', true);

Even though it does not change the value, still keeps the old one...
 
Ok for this url index.php?option=com_content&view=article&id=107&Itemid=1094#XXX={yyy}, putting this php code in the condtion text area will work:

PHP:
$app = JFactory::getApplication();
$app->input->set('yyy', 'bar');
 
Thanks Rob!

I confirm that this solution works! I just have a question, as the hash symbol "#" is being translated in "%23", instead of the actual symbol... I have tried to use the ASCII equivalent "#" but It doesn't convert... Any ideas on this?
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top