Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default 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/ind...&products_id=1
    (*I am only testing this on my weakest selling product) I know... testing on a live site... naughty naughty!
    ~ jasmel : My Store Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

  2. #2
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default 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
    ~ jasmel : My Store Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

  3. #3
    Join Date
    Jul 2008
    Location
    PA
    Posts
    23
    Plugin Contributions
    0

    Default Re: Attribute of textbox - read only?

    Where exactly do you place this command?

  4. #4
    Join Date
    Feb 2008
    Location
    Washington State
    Posts
    236
    Plugin Contributions
    0

    Default Re: Attribute of textbox - read only?

    Quote Originally Posted by CREEPUR View Post
    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!
    ~ jasmel : My Store Using Contributions: Wallet Theme | Simple Google | Quantity Discounts | Godaddy | FAQ's | Confirm Email Address Entry | Admin login as customer | Newsletter Subscribe | CampaingMonitor

 

 

Similar Threads

  1. TEXT on read only attribute
    By orispace in forum General Questions
    Replies: 3
    Last Post: 28 Sep 2010, 11:19 PM
  2. Hiding READ ONLY attribute
    By Endre in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 26 Oct 2009, 11:17 PM
  3. read only attribute
    By bmpt in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 19 Apr 2009, 10:52 PM
  4. Read Only Attribute
    By beowulf1066 in forum General Questions
    Replies: 3
    Last Post: 1 Mar 2007, 01:52 AM
  5. read only attribute value size too small/ import html in read only attribute value
    By nazzaw in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 22 Jan 2007, 03:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR