Re: ids now included in Formulator fields

Kit BLAKE <[email protected]> Fri, 16 Oct 2009 11:13:32 +0200
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
On 16 Oct 2009, at 03:45, Andy Altepeter wrote:

> On Saturday 10 October 2009 10:04:39 am Kit BLAKE wrote:
>> Seems the new version of Forumulator - which we're using in 2.2 - now
>> adds ids to fields. This has created some conflict problems because
>> we've added ids in the Formulator 'extra' fields. Everywhere. :(  But
>> we think letting Formulator do it is the best behavior so we're
>> planning on removing all the id=${here/id} and variants. You might
>> check your own code.
>
> Everyone - sorry about that.  I added ids to many formulator fields  
> without
> thinking about the possible repercussions.

Aha, so that was you! No problem, it's better this way.

> I have a few additional todo's
> now regarding this:
>
> 1) sanitize the ids so they are valid html id's (and also valid CSS
> selectors).  Mainly this means stripping out periods and colons from  
> field
> ids.

Please, replace with dashed, e.g. silva-content-shorttitle

> 2) It would be nice to add to the Formulator ZMI screens a printout  
> of what
> the html id of the field is.

Perhaps both name and id:
name="silva-content.shorttitle:record" id="silva-content-shorttitle"

Kit


-- 
Kit BLAKE · Infrae · http://infrae.com/ + 31 10 243 7051