[prev in list] [next in list] [prev in thread] [next in thread]
List: binarycloud-dev
Subject: Re: [binarycloud-dev] New Form (again)
From: Jason Hines <jch () eyeintegrated ! com>
Date: 2004-03-25 18:43:10
Message-ID: 4063283E.4010800 () eyeintegrated ! com
[Download RAW message or body]
Manuel Holtgrewe wrote:
> Form id = form
> FormComponent id = username
> TextFormInput id = input
> ErrorFormInput id = error
> HintFormInput id = hint
Yes, this makes sense - as long as FormComponent::Init() can be easily
extended to allow this fixed functionality to be altered. (IE: if no
hint is desired, etc, override FormComponent::Init() and only add the
children that you want.)
> Additionally: How should error get the text to display? Should it check
> $this->parent->children['input'] for errors, should the FormComponent do
> so?
I tend to think top->down, having a method in FormComponent do this -
again, so that the dev can override FormComponent::SetError() for
special behavior, though I think errors should be a common thing and
would not require overridding in 99% of real cases.
> What about multiple elements in a component like an "commit" and a
> "delete" button in the same row?
I am convinced that in order to do this, one would need to create a
custom FormInput, and that we should not attempt to define "composite"
inputs via NDF. This has proven to be inflexible IMO.
Instead, in your example I see something like a ButtonRowFormInput
whereas the template would have:
<input type="button" name="{$node.id}_commit" value="Commit" />
<input type="button" name="{$node.id}_delete" value="Delete" />
> (btw, what about renaming non-input elements to *FormElement?)
As in LabelFormElement? Sure - or perhaps just LabelFormNode.
jason
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@binarycloud.tigris.org
For additional commands, e-mail: dev-help@binarycloud.tigris.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic