Jump to content

[solved] recapture on contact-form.tpl hides send button?


Recommended Posts

folks, need help. installed google (?) recapture on my contact form.tpl and the capture shows but I cannot see the send button anymore?! any help is needed to get this fixed asap. thanks in advance. phil

 

Code in my contact-form.tpl, inserted the recapture snippet before the submit button; well, thought I did this:

 

 <p class="submit">
  {literal}
  <script type="text/javascript">				  
  var RecaptchaOptions = {
  theme : 'white'
  };
  </script>	  
  <style type="text/css">
  #recaptcha_area { margin: 0 auto;}
  </style>
  {/literal}
  <p class="text"><strong>CAPTCHA challenge:</strong> {l s='Please enter the 2 words and then click Send.'}</p>
  {$recaptchahtml}</p>

  <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" onclick="$(this).hide();" />
 </p>

Link to comment
Share on other sites

try to remove the </p> right after the {$recaptchahtml}

hm, that did not do the trick even after forced recompile and cache disabled. I am pretty sure I just added the part between the {literal} code and really wonder why the submit button disappeared completely then...

 

EDIT: yes, double checked and commented all capture code out. But even with this code still the send button does not show?

 

<p class="submit">
<input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" onclick="$(this).hide();" />
 </p>

 

EDIT2: the send button for the send-to-a-friend module works just fine...

Edited by Pippo3000 (see edit history)
Link to comment
Share on other sites

hey, you've got:

 

<p>

<p>

</p>

</p>

 

remove the second p - you can use for example <span> instead the <p>

I now have it like this - disabled captcha completely for debugging - and still no send button:

 <p class="text">
  <label for="email">{l s='E-mail address'}</label>
  <input type="text" id="email" name="from" value="{$email}" />
 </p>
 <p class="textarea">
  <label for="message">{l s='Message'}</label>
   <textarea id="message" name="message" rows="7" cols="35">{if isset($smarty.post.message)}{$smarty.post.message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea>
 </p>
 <p class="submit">
  <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" onclick="$(this).hide();" />
 </p>

but this should be the default code now or is there still a <p> too much? Thanks for your ongoing help btw. Very much appreciated. Phil

Link to comment
Share on other sites

thanks

 

i checked it, here is the source:

 

<p class="submit"> <input type="submit" name="submitMessage" id="submitMessage" value="senden" class="button_large" onclick="$(this).hide();" style="display: none;"></p>

 

as you can see - there is a style="display:none;" - this is the problem.

Link to comment
Share on other sites

it isn't hardcoded in your tpl file?

no, I cannot see the part you mentioned. since I cannot attach the file I post the complete code here:

{capture name=path}{l s='Contact'}{/capture}
{include file="$tpl_dir/breadcrumb.tpl"}
{*<h2>{l s='Contact us'}</h2>*}
<h2><img src="/img/kontakt.png" alt="kontaktieren sie uns" /></h2>
{if isset($confirmation)}
<p>{l s='Your message has been successfully sent to our team.'}</p>
<ul class="footer_links">
 <li><a href="{$base_dir}"><img class="icon" alt="" src="{$img_dir}icon/home.gif"/></a><a href="{$base_dir}">{l s='Home'}</a></li>
</ul>
{else}
<p class="bold">{l s='For questions about an order or for information about our products'}.</p>
{include file="$tpl_dir/errors.tpl"}
<form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std">
 <fieldset>
  {*<h3>{l s='Send a message'}</h3>*}
  <p class="select hidden">
   <label for="id_contact">{l s='Subject'}</label>
   <select id="id_contact" name="id_contact" onchange="showElemFromSelect('id_contact', 'desc_contact')">
 {*<option value="0">{l s='-- Choose --'}</option>*}
   {foreach from=$contacts item=contact}
 <option value="{$contact.id_contact|intval}" {if isset($smarty.post.id_contact) && $smarty.post.id_contact == $contact.id_contact}selected="selected"{/if}>{$contact.name|escape:'htmlall':'UTF-8'}</option>
   {/foreach}
   </select>
  </p>
  <p id="desc_contact0" class="desc_contact"> </p>
 {foreach from=$contacts item=contact}
  <p id="desc_contact{$contact.id_contact|intval}" class="desc_contact" style="display:none;">
  <label> </label>{$contact.description|escape:'htmlall':'UTF-8'}</p>
 {/foreach}
 <p class="text">
  <label for="email">{l s='E-mail address'}</label>
  <input type="text" id="email" name="from" value="{$email}" />
 </p>
 <p class="textarea">
  <label for="message">{l s='Message'}</label>
   <textarea id="message" name="message" rows="7" cols="35">{if isset($smarty.post.message)}{$smarty.post.message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea>
 </p>
 <p class="submit">
  <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" onclick="$(this).hide();" />
 </p>
</fieldset>
</form>
{/if}

Link to comment
Share on other sites

hello

 

i checked sources of your website once again and what i found is:

 

$('.submitMessage, #submitMessage').css('display','none');

 

this is the script for add style="display:none;"

 

its a QapTcha and you can find it in the source, remove it

Link to comment
Share on other sites

  • 2 months later...

i have the same problem but do not know which file I need to change

 

you also use this module?

it will be easier to debug if you will share the url to your page

i will check it and show you the way to fix your issue

thanks in advance

Link to comment
Share on other sites

you also use this module? it will be easier to debug if you will share the url to your page i will check it and show you the way to fix your issue thanks in advance

Thank you for the reply, I sent you a private message with the link of the page.

Link to comment
Share on other sites

  • 3 months later...
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...