Page 1 of 1

Customisation form input elements. HOW TO???

Posted: Thu Feb 14, 2008 10:14 am
by cms_tester
IE is not supported css formating of input element like input[type="submit"] or input[type="text"].
I can setup (for example) black border and white bacground only for all input. That is why both submit buton anr text for entering search text will have the same appeance :( But I`m wish to have differnt appeance of buton and text field!

The solution is to set in HTML individual class name for each element, somethig like that:
<input type="submit" class="submit"....
<input type="text" class="text"....


and in css use instead of input[type="text"] {... simply input.text {...

So, my problem is in search form :( which html-content is generated automaticaly

What modification of core files must be done to appent corresponding classname for every elemet of form elements (submit, reset, label, text, textarea, ....)

???

[SOLVED] Customisation form input elements. HOW TO???

Posted: Mon Feb 18, 2008 10:52 am
by cms_tester
To all who also need solution (I found it by myself) - insert before tag code:

Code: Select all

{literal}
<__script__ language="javascript"> 
<!-- 
 if (document.getElementsByTagName) 
 { 
 var e=document.getElementsByTagName('input'); 
 for(i=0;i<e.length;i++) { if(e[i].getAttribute('type')) e[i].className+=' '+e[i].getAttribute('type'); } 
 }
//--> 
</__script> 
{literal}
it is not right way - but it works