in Wordpress Themes by gatorjack (640 points)
Beta has a Contact Us form. The form uses Google's ReCAPTCHA for form verification/ Unfortunatley, the default ReCAPTCHA style is the red style. For those that want a much better style to match their website design, they are in luck. Google actually provides three alternative styles to the default red, giving a total of four styles. You can see the styles and how to implement in your own code here:

https://developers.google.com/recaptcha/docs/customization

For those not tech-savvy enough to decipher how to do this in TT themes, here's some basic instructions.

In your Wordpress theme open the file functions.php. On line 3155 at the beginning press enter. This will move the following code to line 3156:

<form method="post">


On line 3155 paste this code, which can be found on the ReCAPTCHA page referenced above.

<script type="text/javascript">
 var RecaptchaOptions = {
    theme : 'theme_name'
 };
 </script>


You will have to manually change the style anytime you want a different one. Replace theme_name with the theme you want. The options are red, white, blackglass, and clean. So if you wanted blackglass then your code would look like this:


<script type="text/javascript">
 var RecaptchaOptions = {
    theme : 'blackglass'
 };
 </script>


That's it! I hope to see this added to the Contact Us Form options. It would be easy for TT to implement. All they have to do is add the JS code as I just described except instead having a theme there it would simply be calling the value from the theme settings.

3 Answers

by gatorjack (640 points)
This is a quick update. While using the Contact Form I went to modify it and noticed in the latest version of TemplateToaster (4.2.0.6176) that the location has changed a bit. Previously, the line to place the JavaScript code was on 3155. Now, you'll want to go down to line 3264. Directions are the same as previously stated. Only difference is the line number on which you place the JavaScript code.
by sarah (15.2k points)
Thanks for your kind suggestion. We had consider it and forwarded it to our development team.
by gatorjack (640 points)
It should be quite trivial to add a table row in the functions.php file as I've noticed that's where it appears that the Contact Us administrative settings are at. Adding a table row/column so that users could select one of the four options. Then in the functions.php file have what I've already posted here but instead of it having red, clean, etc, it'd be the variable that pulls the setting for what reCAPTCHA form style is set to.
Interested in localizing/Translating TemplateToaster Software in your native language in exchange of a Pro License ? Contact Us
...