Customisation form input elements. HOW TO???

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
cms_tester
Forum Members
Forum Members
Posts: 13
Joined: Thu Feb 14, 2008 9:54 am

Customisation form input elements. HOW TO???

Post 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, ....)

???
Last edited by cms_tester on Thu Feb 14, 2008 10:24 am, edited 1 time in total.
cms_tester
Forum Members
Forum Members
Posts: 13
Joined: Thu Feb 14, 2008 9:54 am

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

Post 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
Post Reply

Return to “CMSMS Core”