Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Attribute of textbox - read only?

Attribute of textbox - read only?

Locked

Views: 3,846

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
8 Jul 2008, 12:50 AM
#1
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Attribute of textbox - read only?

Is is possible to create a text attribute and then set the text box become "read-only"?

I have a JavaScript that auto populates the text area of a current attribute... works like a champ! Problem is that I created the JavaScript due to the customer occasionally puts in the wrong info even after my fancy code inputs the correct info. They manually overwrite what was put into the text box by the code then type in something new. *example: another child's name (*one not on the list)

I was hopping that I could make the textbox readonly.

I didn't see that option in the attributes controller in the CP.

Example: http://www.justmymusic.com/store/index.php?main_page=product_music_info&cPath=1&products_id=1
(*I am only testing this on my weakest selling product) I know... testing on a live site... naughty naughty! :blush:

8 Jul 2008, 2:25 AM
#2
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Re: Attribute of textbox - read only?

Found the answer... well via JavaScript:

Just in case somebody stumbles upon this thread:

document.getElementById("attrib-1-0").readOnly=true

15 Jul 2008, 10:41 PM
#3
creepur avatar

creepur

New Zenner

Join Date:
Jul 2008
Location:
PA
Posts:
23
Plugin Contributions:
0

Re: Attribute of textbox - read only?

Where exactly do you place this command?

18 Jul 2008, 2:16 PM
#4
jasmel avatar

jasmel

Zen Follower

Join Date:
Feb 2008
Location:
Washington State
Posts:
230
Plugin Contributions:
0

Re: Attribute of textbox - read only?

CREEPUR:

Where exactly do you place this command?

*I sell music related products so I put it into tpl_product_music_info_display.php

Where as most would probably put it into: tpl_product_info_display.php

Path: /store/includes/templates/YOURTEMPLATE/template/tpl_product_info_display.php

Hope that helps!