[dokuwiki] Re: Improvements in form handling for plugins

On Mon, 23 Jul 2007 20:39:42 -0400
"TNHarris" <telliamed@xxxxxxxxxxx> wrote:

> I've completely rewritten how most forms are output that makes them
> structured and easily modifiable by plugins. A Doku_Form class manages
> the form as a list of elements. An element can be a string (output
> directly), or an array that describes an HTML element (somewhat like
> what you get from expat) or one of the common form elements: 'button',
> 'textfield', 'checkboxfield', and a special 'wikitext' element for
> edit forms. Hidden fields are also managed specially by the class.

I like it. Do you mind to make a few minor changes?

1st: The helper functions to create the elements are expecting their
parameter in a not too optimal order.

I'd expect the following order:
  type, name, value, label, id, class, attrs

2nd: attributes shouldn't be printed if empty (eg. class=""). I just
pushed a patch for buildAttributes which should help with this.

Andi

-- 
http://www.splitbrain.org

Other related posts: