Updated: wrong redirect after sumbit by ajax

There is a Fabrik event that can be added for executing some javascript code after a form is submitted and DB is updated ?

Something like:

Fabrik.addEvent("fabrik.form.??????????????", function() { some javascript code }.bind(this));

Thx
 
I preusme this is when the form is submitting via ajax (otherwise it won't be possible as the form submit will start the loading of a new page)
In which case this is what you are after:

JavaScript:
Fabrik.addEvent('fabrik.form.submitted', function (form, json) {
});
 
I preusme this is when the form is submitting via ajax (otherwise it won't be possible as the form submit will start the loading of a new page)
In which case this is what you are after:

JavaScript:
Fabrik.addEvent('fabrik.form.submitted', function (form, json) {
});

Thx Rob.

The event works fine, but i still have a problem with submit via ajax.

For submitting via ajax add "&ajax=true" to url is enough ? Because adding "ajax=true" i receive an error after submit.

The url is :

http://93.50.84.227/joomla/index.ph...w=form&formid=10&ajax=true&Itemid=449&lang=it

After submit browser open a blank new page at this url:

http://93.50.84.227/joomla/index.ph...emid=449&lang=it&format=raw&task=form.process

with only this written:

{"msg":"","url":"http:\/\/93.50.84.227\/joomla\/index.php?option=com_fabrik&view=form&formid=10&Itemid=449&lang=it","baseRedirect":true,"rowid":"64"}

Without "ajax=true" browser go back correctly.

Thx

Richy
 
Not really sure what you are asking.

No, just adding &ajax=1 to the view=form URL doesn't enable AJAX submission.

The form will only submit via AJAX if it's in a J! article, using the Fabrik content plugin, or being displayed in a module position using the form module plugin.

For normal "component" loaded forms, i.e. using the option=com_fabrik&view=form URL, the form will submit through normal form submission with a page reload, not through AJAX.

-- hugh
 
Not really sure what you are asking.

No, just adding &ajax=1 to the view=form URL doesn't enable AJAX submission.

The form will only submit via AJAX if it's in a J! article, using the Fabrik content plugin, or being displayed in a module position using the form module plugin.

For normal "component" loaded forms, i.e. using the option=com_fabrik&view=form URL, the form will submit through normal form submission with a page reload, not through AJAX.

-- hugh

Thx you.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top