Comment 2 for bug 527946

Revision history for this message
Sander van Schouwenburg (Sandworm) (sander-sinaasappel) wrote :

 1491 Sander van Schouwenburg 2010-02-25
      [form] Merged subform support from a private project.

      See also bug #527946

Apparently the merge info has gotten lost in the merge, so here is the log from the merge source:

 1736 ontwerp 2010-01-15
      [form] Form prefix support

      Adds prefix support to forms. A form can have a prefix, which is an array of
      strings. All form control names will be prefixed with the given prefix during
      rendering.

      This is best explained by example. Suppose a form control has the name
      'mytext', and the form has the prefix array('foo', 'bar'), then the name in the
      output will be 'foo[bar][mytext]'.

      This is necessary for the upcoming patch for subform controls.

      Note that any custom controls which directly extend AnewtFormControl must
      be patched to use the new $control->get('rendered-name');

      Complex controls like AnewtFormControlFileUpload currently do not support
      prefixes. They will however work fine when not using prefixes.

 1737 ontwerp 2010-01-15
      [form] Subform support

      A new form control AnewtFormControlSubform can incorporate another form into a
      larger form. This is done by using prefixes to prefix all controls of the
      subform. It works recursively.

      AnewtFormRendererBase and AnewtFormRendererDefault are modified so that it is
      possible to render a form without the <form> tags.

      Note that file upload controls, and other controls which do not handle prefixes
      correctly will not work in subforms. They will however work fine in the main
      form.