Custom checkout field question

General ShopSite user discussion

Custom checkout field question

Postby Gary » Sat Oct 15, 2005 9:30 am

I am setting up custom checkout fields on the Checkout page and am having
trouble formatting the "Text" option. I have made the other options work,
but I am missing something on this one. What is correct format and is there
an option to set a maximum number of characters that can be entered? Here
is what I have that does not work:

<tr><td align="left" colspan="2"><text name="field02" cols=40>Gift Card
To:</text></td></tr>

Thanks for any input.

Gary
Gary
 

Re: Custom checkout field question

Postby loren_d_c » Sat Oct 15, 2005 5:59 pm

<text name="field02" cols=40>Gift Card To:</text> is not the correct
HTML to generate a textarea field. To generate a textarea it should be
more like this:

<textarea name="field02" cols=40 rows=3>Gift Card To:</textarea>

I don't think there is a character limit attribute for the textarea
input type, although you could probably do it with JavaScript, I have
seen this on quite a few sites like my cell phone company's text
messaging entry fields.

However, it is possible that what you want isn't really a <textarea> at
all. If all you want is a single-line input field, you may want to try
this an 'input type=text' which is an entirely different HTML tag:

<input type=text name="field02" length=40 value="Gift Card To:">

I think that most browsers will respect an additional 'maxlength'
parameter for this input type, try something like 'maxlength=40'.

Also, either of these examples will put the text "Gift Card To:" IN the
text field by default, this will require your shopper to delete it
before they enter their values. If this is not desirable, then you
should put this text BEFORE the input fields, perhaps like this:

Gift Card To: <input type=text name="field02" length=40 maxlength=40
value="">

-Loren


Gary wrote:
I am setting up custom checkout fields on the Checkout page and am having
trouble formatting the "Text" option. I have made the other options work,
but I am missing something on this one. What is correct format and is there
an option to set a maximum number of characters that can be entered? Here
is what I have that does not work:

tr><td align="left" colspan="2"><text name="field02" cols=40>Gift Card
To:</text></td></tr

Thanks for any input.

Gary

loren_d_c
 
Posts: 2569
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Custom checkout field question

Postby Gary » Sun Oct 16, 2005 8:06 am

Thanks Loren.

Gary

"Loren" <loren_d_c@yahoo.com> wrote in message
news:dis8ju$1s6$1@eval.shopsite.com...
text name="field02" cols=40>Gift Card To:</text> is not the correct
HTML to generate a textarea field. To generate a textarea it should be
more like this:

textarea name="field02" cols=40 rows=3>Gift Card To:</textarea

I don't think there is a character limit attribute for the textarea
input type, although you could probably do it with JavaScript, I have
seen this on quite a few sites like my cell phone company's text
messaging entry fields.

However, it is possible that what you want isn't really a <textarea> at
all. If all you want is a single-line input field, you may want to try
this an 'input type=text' which is an entirely different HTML tag:

input type=text name="field02" length=40 value="Gift Card To:"

I think that most browsers will respect an additional 'maxlength'
parameter for this input type, try something like 'maxlength=40'.

Also, either of these examples will put the text "Gift Card To:" IN the
text field by default, this will require your shopper to delete it
before they enter their values. If this is not desirable, then you
should put this text BEFORE the input fields, perhaps like this:

Gift Card To: <input type=text name="field02" length=40 maxlength=40
value=""

-Loren


Gary wrote:
I am setting up custom checkout fields on the Checkout page and am
having
trouble formatting the "Text" option. I have made the other options
work,
but I am missing something on this one. What is correct format and is
there
an option to set a maximum number of characters that can be entered?
Here
is what I have that does not work:

tr><td align="left" colspan="2"><text name="field02" cols=40>Gift Card
To:</text></td></tr

Thanks for any input.

Gary

Gary
 


Return to User Forum

Who is online

Users browsing this forum: Bing [Bot] and 72 guests