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 #119

Closed adam-clarey closed 8 years ago

adam-clarey commented 8 years ago

This was implemented a while back but not fully finished until i noticed it just now.

Now to submit a form that does not redirect but shows messages you push objects to:

data.messages

data.messages.push({
    "type" : "info",
    "message" : "Successfully saved"
  });

To redirect to set data.callback = 'path';

Ive updated the docs here https://github.com/CityWebConsultants/Iris/wiki/Form-system#registering-a-validate-handler

pau1m commented 8 years ago

+1 but when I see well written explanations like this, it makes me think they should be in a doc somewhere also