is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 12 years ago

#1002 closed enhancement (fixed)

jForms: add CSS class to specify control types in html builders

Reported by: Julien Owned by: Julien
Priority: normal Milestone: Jelix 1.2 beta
Component: jelix:plugins:jforms Version: trunk
Severity: minor Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:


I think it could be quite usefull to have a css class generated on every form control in html builders.

This gives a lot of control over rendered form.

An example : a form with a date control and a menulist. The items in the menulist are very very long, so that the menulist is too wide for my design.

No problem, I set:

.jforms-table select{

but then my selectbox in the date elements get 100% wide too :(

So I suggest adding class to every elements so we can write:


NB : yes, for this particular example I could have use max-width CSS property (not well supported in IE before 8 as I read, btw), but this is just an example.

Attachments (1)

1002-jForms-htmlbuilders-cssclass-for-controls.diff (2.6 KB) - added by Julien 12 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by Julien

  • Status changed from new to assigned

comment:2 Changed 12 years ago by laurentj

  • review changed from review? to review+

ok, why not.

note you could also use other selectors, by using ids

#myfirstselect, #mysecondselect {

comment:3 Changed 12 years ago by Julien

yup of course, but I need form-independant CSS rules, because I don't want to put a style on every form id. And I'm working on something to allow cms users to build their own form, so forms (and thus field's ids) aren't pre-defined.

I'll commit this in the trunk today.

comment:4 Changed 12 years ago by Julien

I need a little more time to fix unit tests.

comment:5 Changed 12 years ago by Julien

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.