Print Page | Close Window

Remove Character Count

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=5376
Printed Date: 02-December-2024 at 6:37pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Remove Character Count
Posted By: dccreatives
Subject: Remove Character Count
Date Posted: 13-December-2012 at 1:33pm
I forgot where I go to so can hide the character count from displaying on my viewprd.asp page. I do not want to show the message.

Thanks.



Replies:
Posted By: dccreatives
Date Posted: 13-December-2012 at 1:34pm
I mean from the custom input text areas!


Posted By: Guests
Date Posted: 13-December-2012 at 5:26pm
Simply set the maximum chars to 0 and the char count will not be displayed.


Posted By: dccreatives
Date Posted: 13-December-2012 at 5:39pm
Can't remember where I do that?

Also, will it hide the language on how many characters are allowed and how many are left to be used?

I want to remove that completely.


Posted By: Guests
Date Posted: 13-December-2012 at 5:50pm
Navigate to your product in the control panel. When you're on the Modify Product page, click the text link along the top to Custom Fields. On that screen click edit for the field(s) you want to change.

Setting maximum chars to 0 will prevent the entire line from displaying.


Posted By: dccreatives
Date Posted: 17-December-2012 at 10:10am
OK Thanks.

Do I need to do this for each product? There is no way to remove it from the custom input field altogether.


Posted By: dccreatives
Date Posted: 17-December-2012 at 10:15am
I tried that, but I cannot add to a single line input anything.

Where in the code can I hide the message without changing the settings?


Posted By: Guests
Date Posted: 17-December-2012 at 2:27pm
ah. I do see that on text inputs as opposed to textareas.

Easiest thing to do here would be to find the following in viewPrdCode.asp:
<% if TextArea="-1" then %>
    <br>
    <textarea name="xfield1" cols="<%=widthoffield%>" rows="<%=rowlength%>" style="margin-top: 6px" <%if maxlength>"0" then%>onkeyup="javascript:testchars(this,'1',<%=maxlength%>);"<%end if%>><%if tIndex<>0 and (xfieldArrCnt > 0 or isArrCount>0) then response.write tempIdOpt(0) end if %></textarea>
    <%if maxlength>"0" then%>
    <br>
    <%response.write dictLanguage.Item(Session("language")&"_GiftWrap_5a")%><span id="countchar1" name="countchar1" style="font-weight: bold"><%=maxlength%></span> <%response.write dictLanguage.Item(Session("language")&"_GiftWrap_5b")%>
    <%end if%>
<% else %>
    <br>
    <input type="text" name="xfield1" size="<%=widthoffield%>" maxlength="<%=maxlength%>" style="margin-top: 6px" <%if tIndex<>0 and (xfieldArrCnt > 0 or isArrCount>0) then%> value="<% response.write tempIdOpt(0) %>" <%end if %> <%if maxlength>"0" then%>onkeyup="javascript:testchars(this,'1',<%=maxlength%>);"<%end if%>>
    <%if maxlength>"0" then%>
    <br>
    <%response.write dictLanguage.Item(Session("language")&"_GiftWrap_5a")%><span id="countchar1" name="countchar1" style="font-weight: bold"><%=maxlength%></span> <%response.write dictLanguage.Item(Session("language")&"_GiftWrap_5b")%>
    <%end if%>
<% end if %>

and change that to:
<% maxlength=0 %>
<% if TextArea="-1" then %>
    <br>
    <textarea name="xfield1" cols="<%=widthoffield%>" rows="<%=rowlength%>" style="margin-top: 6px" <%if maxlength>"0" then%>onkeyup="javascript:testchars(this,'1',<%=maxlength%>);"<%end if%>><%if tIndex<>0 and (xfieldArrCnt > 0 or isArrCount>0) then response.write tempIdOpt(0) end if %></textarea>
    <%if maxlength>"0" then%>
    <br>
    <%response.write dictLanguage.Item(Session("language")&"_GiftWrap_5a")%><span id="countchar1" name="countchar1" style="font-weight: bold"><%=maxlength%></span> <%response.write dictLanguage.Item(Session("language")&"_GiftWrap_5b")%>
    <%end if%>
<% else %>
    <br>
    <input type="text" name="xfield1" size="<%=widthoffield%>" style="margin-top: 6px" <%if tIndex<>0 and (xfieldArrCnt > 0 or isArrCount>0) then%> value="<% response.write tempIdOpt(0) %>" <%end if %> <%if maxlength>"0" then%>onkeyup="javascript:testchars(this,'1',<%=maxlength%>);"<%end if%>>
    <%if maxlength>"0" then%>
    <br>
    <%response.write dictLanguage.Item(Session("language")&"_GiftWrap_5a")%><span id="countchar1" name="countchar1" style="font-weight: bold"><%=maxlength%></span> <%response.write dictLanguage.Item(Session("language")&"_GiftWrap_5b")%>
    <%end if%>
<% end if %>


Posted By: dccreatives
Date Posted: 17-December-2012 at 8:50pm
Thanks that worked perfectly.


Posted By: dccreatives
Date Posted: 17-December-2012 at 9:42pm
Thanks for all your help. I noticed that it removes it from the first textfield, but not from the additional textareas.

Should I duplicate this code for each textarea?


Posted By: Guests
Date Posted: 18-December-2012 at 12:07am
Oh, right. Sorry. I don't have a lot of time to give tips at the code level.

PC has up to three max of these types of fields, as I recall. So, yeah, you'd need to do the same for each of them if you want to kill this on all of them.

They are signified by "xfieldN" where N is a number from 1-3. Find the same chunk of inline code for xfield2 and xfield3 and you should be all good.

EI's code really should be more modular here -- it's the same code for each iteration ... begs for a subroutine with the field ID as a variable fed into it, IHMO.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net