Last active
January 22, 2018 22:38
-
-
Save stevewithington/7095706 to your computer and use it in GitHub Desktop.
Mura CMS: Example of how to intercept form data after it's been saved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="onAfterFormSubmitSave"> | |
<cfargument name="$"> | |
<cfoutput> | |
<p>The title of this page is: #$.content('title')#<br> | |
The form submitted is: #$.event('formbean').getValue('title')#</p> | |
<cfdump var="#$.event('formbean').getAllValues()#"> | |
<cfabort /> | |
</cfoutput> | |
</cffunction> |
So how does this work with the async forms starting with 6.2?
For such functionality with async forms check the page through below link for "onFormSubmitResponseRender".
Replace "onAfterFormSubmitSave" with "onFormSubmitResponseRender".
http://docs.getmura.com/v7/mura-developers/mura-events/event-hooks/content-related-events/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@stevewithington, does this actually retrieve the values from a form submitted within a page? If so, where might they be? Currently only getting the form-builder JSON as a body.
$.event('formbean').getFields()
also does not return anything. Having to revert to using$.event('name')