![]() |
How do I increase the size of a text field in "customer options"???
For one of the options I want a multiple line text field instead of the single line. I know I need to modify /modules/Product_Options/customer_options.tpl but I'm unsure of exactly the code I need to use. I want to use an "if" statement so that only the customer option named Description shows up as a multiple line text field.
If anyone could help me out that would be awesome...thanks! |
Re: How do I increase the size of a text field in "customer options"???
Does anyone know?? I really need to launch a new product with larger text fields for customer options. I'll even pay someone to help me out.....
|
Re: How do I increase the size of a text field in "customer options"???
{if $v.is_modifier eq 'T' & $v.classtext eq 'Notes'}
<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" style="width:300px;height:100px" /> {else $v.is_modifier eq 'T'} <input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" /> Change Notes to wahtever you named you field, and just placve a style in the box. |
Re: How do I increase the size of a text field in "customer options"???
I placed this in customer_options.tpl :
{elseif $v.is_modifier eq 'T' & $v.classtext eq 'Keywords'} <input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" style="width:300px;height:100px" /> {else $v.is_modifier eq 'T'} <input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" /> The option that I named Keywords is still displaying the regular text field. Did I enter something wrong? Thanks |
Re: How do I increase the size of a text field in "customer options"???
post the contents of your customer_options.tpl
|
Re: How do I increase the size of a text field in "customer options"???
Code:
{* $Id: customer_options.tpl,v 1.24 2006/04/07 05:19:21 svowl Exp $ *} |
Re: How do I increase the size of a text field in "customer options"???
try this.... I just moved it to the top like it is in mine. may work may not. did not test.
!!!!MAKE A BACK UP FIRST!!!! {* $Id: customer_options.tpl,v 1.24 2006/04/07 05:19:21 svowl Exp $ *} {if $product_options ne ''} {if $nojs ne 'Y'} <tr style="display: none;"><td> <script type="text/javascript" language="JavaScript 1.2"> <!-- var alert_msg = '{$alert_msg}'; --> </script> {include file="modules/Product_Options/check_options.tpl"} </td></tr> {/if} {foreach from=$product_options item=v} {if $v.options ne '' || $v.is_modifier eq 'T'} <tr> <td valign="middle" height="25">{if $usertype eq "A"}{$v.class}{else}{$v.classtext|default:$v.class }{/if}</td> <td valign="middle"> {if $cname ne ""} {assign var="poname" value="$cname[`$v.classid`]"} {else} {assign var="poname" value="product_options[`$v.classid`]"} {/if} {if $v.is_modifier eq 'T' & $v.classtext eq 'Keywords'} <input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" style="width:300px;height:100px" /> {elseif $v.is_modifier eq 'T'} <input id="po{$v.classid}" type="text" name="{$poname}" value="http://" /> {else} <select id="po{$v.classid}" name="{$poname}"{if $disable} disabled="disabled"{/if}{if $nojs ne 'Y'} onchange="javascript: check_options();"{/if}> {foreach from=$v.options item=o} <option value="{$o.optionid}"{if $o.selected eq 'Y'} selected="selected"{/if}>{$o.option_name}{if $v.is_modifier eq 'Y' && $o.price_modifier ne 0} ({if $o.modifier_type ne '%'}{include file="currency.tpl" value=$o.price_modifier display_sign=1 plain_text_message=1}{else}{$o.price_modifier}%{/if}){/if}</option> {/foreach} </select> {if $v.classtext eq 'Country/Region:'} <A HREF="javascript:popUp('http://www.mysitecom/cart/o1.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {elseif $v.classtext eq 'Category:'} <A HREF="javascript:popUp('http://www.mysite.com/cart/o2.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {elseif $v.classtext eq 'Campaign Length:'} <A HREF="javascript:popUp('http://www.mysite.com/cart/o3.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {elseif $v.classtext eq 'Your URL:'} <A HREF="javascript:popUp('http://www.mysite.com/cart/o4.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {elseif $v.classtext eq 'Search Engine Submission:'} <A HREF="javascript:popUp('http://www.mysite.com/cart/o5.php')"><img src="{$ImagesDir}/question.gif" border="0" style="vertical-align: middle;" alt="Click here for more info" /></A> {else $v.is_modifier eq 'T'} <input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" /> {/if} {/if} </td> </tr> {/if} {/foreach} {/if} {if $product_options_ex ne ""} <tr> <td colspan="2"><font id="exception_msg" color="red"></font></td> </tr> {if $err ne ''} <tr> <td colspan="2"><font class="CustomerMessage">{$lng.txt_product_options_ combinations_warn}:</font></td> </tr> {foreach from=$product_options_ex item=v} <tr> <td>{foreach from=$v item=o}{if $usertype eq "A"}{$o.class}{else}{$o.classtext}{/if}: {$o.option_name}<br />{/foreach}<br /></td> </tr> {/foreach} {/if} {/if} |
Re: How do I increase the size of a text field in "customer options"???
Thanks so much, it worked....it now displays as a 300x100 text field, but it still functions as a single-lined text field. I'm sure theres an easy to fix this code to make it function like a multi-lined text box (like this: http://www.echoecho.com/htmlforms08.htm)
<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" style="width:300px;height:100px" /> |
Re: How do I increase the size of a text field in "customer options"???
I fixed it.....heres the code I used instead:
{if $v.is_modifier eq 'T' & $v.classtext eq 'Keywords:'} <textarea type="text" name="{$poname}" value="{$v.default|escape}" cols="35" rows="5"></textarea> |
Re: How do I increase the size of a text field in "customer options"???
I want to add another {if} command to make another option a textarea. How would I do that?
I tried adding this below it and it gives me an error: {elseif $v.is_modifier eq 'T' & $v.classtext eq 'Description:'} <textarea type="text" name="{$poname}" value="{$v.default|escape}" cols="35" rows="5"></textarea> |
All times are GMT -8. The time now is 07:04 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.