Can't overwrite class on CreateInputText??

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
milehigh

Can't overwrite class on CreateInputText??

Post 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.
vilkis

Re: Can't overwrite class on CreateInputText??

Post by vilkis »

you can get some tips in topic http://forum.cmsmadesimple.org/viewtopi ... it=replace

vilkis
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Can't overwrite class on CreateInputText??

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

Return to “Developers Discussion”