Discussion:
[FE-discuss] space inserted into css class by formencode / hmtlfill 1.2.1
Jules Stevenson
2009-02-03 17:40:37 UTC
Permalink
Hi,

I am very green with form encode, so please bear with me. First of all -
thanks, it's a great tool. It's making my life much easier :).

When it's validating my fields it's appending 'error' onto the fields CSS
class as expected, but seems to be putting a space in between which is not
so hot.

Ie. <input class='form'.. becomes <input class='form error'.. after
htmlfill.

This is within a pylons project, but I'm unsure what more material I should
provide for any help with this.

Many thanks,

Jules
Ian Bicking
2009-02-03 18:18:27 UTC
Permalink
Post by Jules Stevenson
I am very green with form encode, so please bear with me. First of all -
thanks, it's a great tool. It's making my life much easier :).
When it's validating my fields it's appending 'error' onto the fields CSS
class as expected, but seems to be putting a space in between which is not
so hot.
Ie. <input class='form'.. becomes <input class='form error'.. after
htmlfill.
This is within a pylons project, but I'm unsure what more material I should
provide for any help with this.
What's the problem? class="form error" means the element has two classes
("form" and "error").
--
Ian Bicking | http://blog.ianbicking.org
Brad Clements
2009-02-03 18:18:49 UTC
Permalink
I don't use form encode, but I would expect this to work exactly the way
it does.

without the space, the class would be "formerror" which is not expected.

formencode does not want to change class names already on the element,
only ADD a new classname 'error'

so formencode has to put a space in front of 'error' to avoid mangling
existing classnames.
Post by Jules Stevenson
Hi,
I am very green with form encode, so please bear with me. First of all -
thanks, it's a great tool. It's making my life much easier :).
When it's validating my fields it's appending 'error' onto the fields CSS
class as expected, but seems to be putting a space in between which is not
so hot.
Ie. <input class='form'.. becomes <input class='form error'.. after
htmlfill.
This is within a pylons project, but I'm unsure what more material I should
provide for any help with this.
Many thanks,
Jules
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
FormEncode-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/formencode-discuss
--
Brad Clements, ***@murkworks.com (315)268-1000
http://www.murkworks.com
AOL-IM: BKClements
Loading...