Jump to content

Contact Form (reCaptcha)


JagWire

Recommended Posts

Is there anyone who has ever created a hook for a custom contact form? After searching the community I was not able to find any results similar to my request. The default form will not call captcha outside the WHMCS contact page. This is the reason for the project.

We like to use a form at the footer of each page for sales purposes. The form works fine except it redirects to a new page when the form is submitted. Seems {php}{/php} no longer works or not very well say the least.

According to WHMCS they stated the following.

Your custom form is coded to submit to the contact2/contact.php page you've created, as can be confirmed by the attached screenshot. You may be able to modify the form tag to use the same page as it is being accessed from, and use the ClientAreaPage hook point to do the actual processing if the form was submitted using the $_POST variables most likely (including validating the captcha), then create a new template variable with the response message and put that above the form in the template file so it can be displayed when set: https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareapage

<form id="contact-form" method="post" action="contact.php" role="form"> is the piece referred above.

of course I have no experience with hooks or deep coding such as they mentioned. I am wondering if anyone knows how to do create this hook? Wwhere the file contact2/contact.php is actually returned to the page submitted from with the "Successful" message rather then opening a new page on submission.

iFrame is an option however it is not very mobile friendly do to set height reasons. We prefer internal instead of external for use of this form. Any help would be greatly appreciated.

Thank you in advance.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated