Jump to content

HTML in TPL (contact form)


Recommended Posts

Dear rocky,

Thank you for the Email!

Please can you just copy me the php code do we have to put inside the file?

The Image:






The Code:

>{capture name=path}{l s='Contact'}{/capture}
{include file=$tpl_dir./breadcrumb.tpl}

{l s='Contact us'}
{if isset($confirmation)}

{l s='Your message has been successfully sent to our team.'}
</pre>
<ul>
{l s='Home'}
</ul>
<br>{else}<br><p>{l s='For questions about an order or for information about our products'}.</p>
<br>   {include file=$tpl_dir./errors.tpl}<br>   <form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std"><br><br><h3>{l s='Send a message'}</h3>
<br><p>
{l s='Subject'}

{l s='-- Choose --'}
               {foreach from=$contacts item=contact}
{$contact.name|escape:'htmlall':'UTF-8'}
               {/foreach}

</p>
<br><p> </p>
<br>       {foreach from=$contacts item=contact}<br><p>
 {$contact.description|escape:'htmlall':'UTF-8'}</p>
<br>       {/foreach}<br><p>
{l s='E-mail address'}
           <input type="text" id="email" name="from" value="{$email}" />
</p>
<br><p>
{l s='Message'}
            <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>
<br><p>
           <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" />
</p>
<br><br></form><br

Link to comment
Share on other sites

I thought you meant you want customers to be able to upload images on the contact form. Simply adding an image to the contact form is easy. Try:

>{capture name=path}{l s='Contact'}{/capture}
{include file=$tpl_dir./breadcrumb.tpl}

{l s='Contact us'}
{if isset($confirmation)}

{l s='Your message has been successfully sent to our team.'}
</pre>
<ul>
{l s='Home'}
</ul>
<br>{else}<br><p></p>
<br><p>{l s='For questions about an order or for information about our products'}.</p>
<br>   {include file=$tpl_dir./errors.tpl}<br>   <form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std"><br><br><h3>{l s='Send a message'}</h3>
<br><p>
{l s='Subject'}

{l s='-- Choose --'}
               {foreach from=$contacts item=contact}
{$contact.name|escape:'htmlall':'UTF-8'}
               {/foreach}

</p>
<br><p> </p>
<br>       {foreach from=$contacts item=contact}<br><p>
 {$contact.description|escape:'htmlall':'UTF-8'}</p>
<br>       {/foreach}<br><p>
{l s='E-mail address'}
           <input type="text" id="email" name="from" value="{$email}" />
</p>
<br><p>
{l s='Message'}
            <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>
<br><p>
           <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" />
</p>
<br><br></form><br

Link to comment
Share on other sites

  • 2 weeks later...

Can this be done for hook.tpl also?

Example:

>{if $hook_position == 'extraLeft'}
{l s='Send to a friend' mod='sendtoafriend'}
{else}
</pre>
<ul>
{l s='Send to a friend' mod='sendtoafriend'}
</ul>
<br



Changing

{l s='Send to a friend' mod='sendtoafriend'}



to

{l s='xxxxxxx.jpg' mod='sendtoafriend'}

Link to comment
Share on other sites

Change:

<a href="{$content_dir}modules/sendtoafriend/sendtoafriend-form.php?id_product={$smarty.get.id_product}">{l s='Send to a friend' mod='sendtoafriend'}



to:

<a href="{$content_dir}modules/sendtoafriend/sendtoafriend-form.php?id_product={$smarty.get.id_product}"><img src="{$img_dir}send_to_a_friend.jpg" alt="{l s='Send to a friend' mod='sendtoafriend'}" />



This will replace the "Send to a friend" text with send_to_a_friend.jpg in the img directory inside your theme.

Link to comment
Share on other sites

Use:

<a href="{$content_dir}modules/sendtoafriend/sendtoafriend-form.php?id_product={$smarty.get.id_product}"><img src="{$img_dir}send_to_a_friend_{$lang_iso}.jpg" alt="{l s='Send to a friend' mod='sendtoafriend'}" /> 



Then create images send_to_a_friend_en.jpg, send_to_a_friend_fr.jpg, etc.

Link to comment
Share on other sites

  • 2 years later...
×
×
  • Create New...