Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release: n/a
Form fields renderers Foswiki::Form::_SomeFormFieldClass_ should add
id attribute in renderForEdit(). With id attribute set, you can use
label tag to make more accessible forms with i.e.
FlexFormPlugin.
For example in Foswiki::Form::Text this can be done like this:
sub renderForEdit {
my ( $this, $web, $topic, $value ) = @_;
return (
'',
CGI::textfield(
-class =>
$this->cssClasses( 'foswikiInputField' ),
-name => $this->{name},
-id => $this->{name},
-size => $this->{size},
-value => $value
)
);
}
id attribute should be unique in HTML document. To enforce that, you can use some prefix in id value.
--
PasiHaekkinen - 25 Mar 2010
We need new features to go through the feature proposal process on the
Development web. Please contribute to the existing
Development.CentralizeHtmlFormHandling topic so this can be discussed, because there may be additional requirements from developers other than yourself that will influence the final implementation.
For example in my own case, my applications need to also namespace these fields so that when multiple topics are presented simultaneously to the user for edit, a save handler will know which input field belongs to which topic.
PasiHaekkinen, could you please add a note with this important detail to the proposal?
Great to see we are all thinking alike.
--
PaulHarvey - 26 Mar 2010
Thanks Paul for your comment. I read the
CentralizeHtmlFormHandling topic and found it a little bit out of my league. I'm new to Foswiki, so I feel that I don't have much to give in that brainstorming. I have some php
QuickForm background, that's why I do like the idea of separating structure and presentation (=html) when generating forms.
--
PasiHaekkinen - 29 Mar 2010
Switched codebase to 1.1.2 and
CurrentState to New.
--
PasiHaekkinen - 24 Nov 2010