Plugin/Events/Contact: Difference between revisions
From Joomla! Documentation
Add updated version of file for 3.x |
|||
| Line 5: | Line 5: | ||
This event is triggered after a contact form has been submitted. | This event is triggered after a contact form has been submitted. | ||
An example use case would be validating a captcha. If you return a Exception object form submission will be terminated. | An example use case would be validating a captcha. If you return a JError, JException or Exception object form submission will be terminated. | ||
'''Parameters''' | '''Parameters''' | ||
*<code>contact</code> A reference to the person who will receive the form. | *<code>contact</code> A reference to the person who will receive the form. | ||
*<code> | *<code>post</code> A reference to the $_POST variable. | ||
'''Return Value''' | '''Return Value''' | ||
None | None or object. See description for details. | ||
'''Called in files''' | '''Called in files''' | ||
*<tt>components/com_contact/controller.php</tt> | *<tt>components/com_contact/controller.php</tt> | ||
| Line 27: | Line 28: | ||
*<code>contact</code> A reference to the person who will receive the form. | *<code>contact</code> A reference to the person who will receive the form. | ||
*<code> | *<code>post</code> A reference to the $_POST variable. | ||
'''Return Value''' | '''Return Value''' | ||
None. | None. | ||
'''Called in files''' | '''Called in files''' | ||
*<tt>components/com_contact/controller.php</tt> | *<tt>components/com_contact/controller.php</tt> | ||
<noinclude>[[Category:Plugin Development]][[Category:Specifications]]</noinclude> | <noinclude>[[Category:Plugin Development]][[Category:Specifications]]</noinclude> | ||
Latest revision as of 18:53, 1 August 2014
Contact events are triggered during the contact form submitting process.
onValidateContact
Description
This event is triggered after a contact form has been submitted. An example use case would be validating a captcha. If you return a JError, JException or Exception object form submission will be terminated.
Parameters
contactA reference to the person who will receive the form.postA reference to the $_POST variable.
Return Value
None or object. See description for details.
Called in files
- components/com_contact/controller.php
onSubmitContact
Description
This event is triggered after a contact form has been submitted. You can use this for sending additional mails etc.
Parameters
contactA reference to the person who will receive the form.postA reference to the $_POST variable.
Return Value
None.
Called in files
- components/com_contact/controller.php