J1.5

Plugin/Events/Contact: Difference between revisions

From Joomla! Documentation

Wilsonge (talk | contribs)
Add updated version of file for 3.x
Wilsonge (talk | contribs)
Undo revision 124530 by Wilsonge (talk)
 
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>data</code> A reference to the data in the $_POST variable.
*<code>post</code> A reference to the $_POST variable.


'''Return Value'''
'''Return Value'''
   
   
None on success or Exception on failure.
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>data</code> A reference to the data in the $_POST variable.
*<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

  • contact A reference to the person who will receive the form.
  • post A 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

  • contact A reference to the person who will receive the form.
  • post A reference to the $_POST variable.

Return Value

None.

Called in files

  • components/com_contact/controller.php