Create Magento Backend Field ReadOnly -


i create read-only field in backend @ client's magento. create fields know (through module) follows:

 $installer->addattribute("customer", "attrcode",  array(      "type"     => "varchar",      "backend"  => "",      "label"    => "label",      "input"    => "text",      "source"   => "",      "visible"  => true,      "required" => false,      "default" => "",      "frontend" => "",      "unique"     => false,      )); 

this way creates field, he's not reading ...

thank

one possible solution use javascript disable button on page load

create js file , upload admin skin/js directory (disable_button.js)

add

document.observe('dom:loaded', function(){      $("target_input_id").disabled=true; }); 

then add or update local.xml include js files

<?xml version="1.0"?> <layout version="0.1.0">     <adminhtml_customer_edit>         <reference name="head">             <action method="additem"><type>skin_js</type><script>js/disable_button.js</script></action>         </reference>     </adminhtml_customer_edit> </layout> 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -