CityWebConsultants / Iris

Modular content management and web application framework built with Node.js and MongoDB
http://irisjs.org
Other
9 stars 7 forks source link

Extend form submissions #399

Closed adam-clarey closed 6 years ago

adam-clarey commented 6 years ago

This extends the form submission process so that after successful submission, you can trigger JS functions with arguments.

In your form submission, this would be triggered as such:

 data.execute = true;

 data.functionName = 'window.location.reload';

 data.arguments = ['arg1', 'arg2'];

 thisHook.pass(data);

This would be the equivalent of running the below on the clientside:


window.location.reload('arg1', 'arg2');