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 13 years ago

Closed 13 years ago

#728 closed new feature (fixed)

jForms: new addControlBefore() method

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


For some reason, I needed to add a control dynamically at the beginning of my jForm (last update date, not set if the entry has not been modified, and makes no sens if the form is used for creation, ...)

So I created an addControlBefore() method, that works like this :

$c = new jFormsControlOutput('update_time');
$c->label = 'Last update';

This will add my output control just before the control with "ref" attribute = "name".

Verified that current unit tests work well.

Attachments (1)

728-jForms-addControlBefore.diff (2.1 KB) - added by Julien 13 years ago.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by Julien

comment:1 Changed 13 years ago by Julien

  • Status changed from new to assigned

comment:2 Changed 13 years ago by laurentj

  • review changed from review? to review+

good idea :-)

comment:3 Changed 13 years ago by Julien

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

commit done in the trunk

Note: See TracTickets for help on using tickets.