Custom Add URL reverts to default Form URL after "Apply"

joomlamate

Member
I have lists with custom Add /Edit URLs.
The custom URLs might include various query parameters, which the form will use to prepend data in hidden fields (or for other reasons).
For other lists/forms one of the query parameters might be a specific Itemid.

If in the form I display only the Save button, after saving I will be back to the previous page (list), or I can use the redirect plugin the go anywhere I want.

However, if I want to display also the Apply button, after "Apply", the form reloads under the default Add/Edit URL of the list, thus I am losing important information from the query parameters.

Why the Apply button does not respect the current URL that form has been submitted from, or at least the defined Add/Edit URL of the list?
 
Hi,

Not sure of the reason why it is as it is, but you can manipulate the following part of the code:

Code:
if (array_key_exists('apply', $this->formData))
{
$url = 'index.php?option=com_' . $this->package . '&view=form&formid=' . $input->getInt('formid') . '&rowid=' . $input->getString('rowid', '', 'string')
. '&listid=' . $input->getInt('listid');
}

in /components/com_fabrik/models/form.php, around line 5165.
 
Hi @juuser - although this is a core file I will check this. If I manage to find the time, I might investigate it further and see if there is something that can and shall be fixed. However I am a bit backed up right now and that project is completed by implementing various workarounds to bypass it, so not sure if I want to make my hands dirty at the moment...
 
Glad you got it sorted out with some workarounds. Changing of core files is what I also personally try to avoid as much as possible.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top