passing Parameters to form in full SEF-formatted-Url

mfeindt 10 Mar, 2016
hi there...

During setup of an application form, I came across a problem. I want to fill some form fields with data from a job offer. But the applicants should be able to apply through a simple link like

But how can i now access the job-alias from within the form for example in a db-read-action? I can get the alias to the $form->data("job-alias") by passing the variable as get-parameter ( but the specification requires the link in full sef-format (

i only found this thread in the forum where Max wrote to setup a custom router.php. But with this solution I do not know how to setup this.

Can anyone help me whit that?

GreyHead 10 Mar, 2016
Hi Matthias,

Provided that you can rely on the format (big question) you can use Custom Code to Parse the data. Something like this:
$url = \JURI::getInstance()->toString();
// remove the prefix and the extra  /s
$url = str_replace(array('http://', 'https://'), '', $url);
$url = explode('/', $url);
$form->data['job-alias'] = $url[2]; // check the index here

mfeindt 11 Mar, 2016
Hi Bob,

thanks for the fast reply.

That works and i'll use it for the moment, but is there also a solution for a custom router.php which parses all non-CF-get-parameters to $form->data?

GreyHead 11 Mar, 2016
HI Matthias,

Not that I know of - they are Non-CF menu items and a CF router would create and parse CF URLs only (I have no idea why Max has never written one for CF).

The general method [componentname]ParseRoute($segments) should allow you to parse SEF URLs from other components. I see that Joomla! 3.3 added a new JComponentRouterInterface - but I have no idea how to use it from reading the docs here.

mfeindt 14 Mar, 2016
Hi Bob,

thanks for the answer and the hint about JComponentRouterInterface. I should have a deeper look at this ;-)

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