Jump to content

show captcha in page


ouldfella

Recommended Posts

hi

i created a new pages contacticos.php and  call the template contacticos.tpl

with this this tpl file i have this code

{include file="$template/includes/captcha.tpl"}

but the captcha is not whown but this file is included, the probleme is in this variable in this captcha.tpl  :

{if $captcha}

why ?

Link to comment
Share on other sites

8 minutes ago, ouldfella said:

no, i didn't added anything, i copied the same form from whmcs contact.tpl file

I think I was politely encouraging you to add that code to the template to make the captcha work. :idea:

I believe it should really be enabled in the php file, but you can do it in the template if necessary.

9 minutes ago, ouldfella said:

just added some input in the form

I have no doubt that you can get the captcha working on a custom page - though whether your custom page would actually send the form results to you, I wouldn't like to say! :?:

Link to comment
Share on other sites

2 minutes ago, ouldfella said:

where to verify if captcha is not empty and correct ?

hmm when I tested it on v7.3, I just created a dummy .php page, copied contact.tpl and added the above code... if I tried to submit the form without filling the captcha, I got the use error message...

so 3 questions...

  1. what version of WHMCS are you using?
  2. which template (hopefully Six !)
  3. are you using WHMCS captcha or Google ?
Link to comment
Share on other sites

I think the issue is that the PHP page needs to check for captcha result... so if you were passing back to a page like contact.php, then captcha would work... but on a deprecated WP theme, that gets a little trickier.

ideally, i'd say to go to the Alaska authors for advice on this, but I don't think the theme is supported any more... 9_9

for simplicity, I might be tempted to use Google recaptcha - not from within WHMCS settings, but add it yourself directly to the PHP file... plenty of tutorials on the web about doing that.

not relevant to you, but another way to do it within WHMCS would have been to use a support department with custom fields... but as this is a WP site, you have a lot more options and can think outside of WHMCS.

Link to comment
Share on other sites

  • 3 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • 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