developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org 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

#757 closed bug (fixed)

jForms: some controls are selected by default if their values are "0".

Reported by: Julien Owned by: Julien
Priority: high Milestone: jelix 1.1
Component: jelix:forms Version: trunk
Severity: major Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

As in #755 and #691, we have the same problem for <checkboxes> and <listbox> controls.

Attachments (1)

Change History (5)

comment:1 Changed 12 years ago by Julien

  • Status changed from new to assigned
  • Summary changed from jForms: some controls' value are selected by default when their value are "0". to jForms: some controls are selected by default if their values are "0".

Here's the patch. verified unit tests.

comment:2 follow-up: Changed 12 years ago by laurentj

  • review changed from review? to review+

I don' like very much this call of create_function, but why not.

comment:3 in reply to: ↑ 2 Changed 12 years ago by Julien

Replying to laurentj:

I don' like very much this call of create_function, but why not.

the other way I thought about was to use a loop to build a new array, but I think it won't be better. Any other idea ?

Will also backport to 1.0.x

comment:4 Changed 12 years ago by Julien

  • Resolution set to fixed
  • Status changed from assigned to closed

committed in the trunk, r1192

Note: See TracTickets for help on using tickets.