Page 1 of 1

Can't overwrite class on CreateInputText??

Posted: Thu Aug 30, 2012 2:07 am
by milehigh
Trying to port a fully responsive framework to CMSMS found here and apply it to a custom module (http://twitter.github.com/bootstrap/)

Code: Select all

$this->smarty->assign('username', $this->CreateInputText($id, 'username', '', 10,'','hello="world" class="input-small" placeholder="Username"'));
Above renders the following:

Code: Select all

<input id="m72510username" class="cms_textfield" type="text" placeholder="Username" hello="world" maxlength="" size="10" value="" name="m72510username">
So...you can't style by ID since it arbitrarily assigns a module ID. It appends cms_textfield ... and ignores a class that I added...yet it will render hello=world.

I fail to see ANY plus side whatsoever to forcing this upon a user and taking away the ability class a text input field.

Is there any workaround here without touching the core code? Am I missing something obvious here?

This is on a 1.10.x series install.

Re: Can't overwrite class on CreateInputText??

Posted: Thu Aug 30, 2012 5:02 am
by vilkis
you can get some tips in topic http://forum.cmsmadesimple.org/viewtopi ... it=replace

vilkis

Re: Can't overwrite class on CreateInputText??

Posted: Thu Aug 30, 2012 9:52 pm
by Dr.CSS
Wehn you add a class to forms it puts it on the div that the input is in, just change your CSS to reflect the class of the div...