Extend List AddRecordLink for javascript

tali

Member
Problem
When the link is for instance
Code:
javascript:createItem(0);
the list.php function getAddRecordLink() returns
Code:
javascript:createItem(0); ?
which with the extra ? creates a javascript error and the link does not work.

Proposal for a solution
May I suggest to add in a future version
Code:
        if (stripos($url, 'javascript:') !== FALSE)
            return $url;
after line 10048 in components/com_fabrik/models/list.php?
 
That line number doesn't jive with the current github code, but I presume you mean after this line?

Code:
$url = FabrikWorker::getMenuOrRequestVar('addurl', $params->get('addurl', ''), $this->isMambot);

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top