Tags:
create new tag
, view all tags

Feature Proposals » TWiki Form Field Types With Configure Attributes

Summary

Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
MergedToCore PeterThoeny AcceptedByReleaseMeeting 2014-10-13   TWikibug:Item7577 KampalaRelease

Edit Form

TopicSummary:
CurrentState:
CommittedDeveloper:
ReasonForDecision:
DateOfCommitment:   Format: YYYY-MM-DD
ConcernRaisedBy:
BugTracking:
OutstandingIssues:
RelatedTopics:
InterestedParties:
ProposedFor:
TWikiContributors:
 

Motivation

The TWikiForms definition table currently has a column for attributes. Possible values are M for mandatory, and H for hidden.

For some types it is useful to have extended attributes that are type specific. For example, the AutocompletePlugin has these additional parameters currently only available when using %AUTOCOMPLETE{}%, not if type autocomplete is used in TWikiForms: class="", style="", selectstyle="", containerstyle="", type="".

Description and Documentation

Enhance the TWikiForms handling to allow key="value" configure attributes, in addition to the M and H attribute in Form field definition.

The M and H flags are deprecate (but remain for compatibility) in favor of more verbose mandatory="1" and hidden="1", respectively.

If used together with an M and H attribute flag, key="value" configure attributes must be specified after the attribute flag(s).

Examples

Example with autocomplete type:

Name: Type: Size Values: Tooltip message: Attributes:
Dinner autocomplete 20 Sauerkraut, Spaghetti, Spam, Steak, Sushi Enter value or pick item style="color: blue;"  

Same example adding the mandatory attribute:

Name: Type: Size Values: Tooltip message: Attributes:
Dinner autocomplete 20 Sauerkraut, Spaghetti, Spam, Steak, Sushi Enter value or pick item mandatory="1" style="color: blue;"  

Same as before, using deprecated M flag:

Name: Type: Size Values: Tooltip message: Attributes:
Dinner autocomplete 20 Sauerkraut, Spaghetti, Spam, Steak, Sushi Enter value or pick item M style="color: blue;"  

Impact

Implementation

The code handling the M and H attributes needs to be fixed to ignore key="value" configure attributes because keys or values may contain M and H characters.

-- Contributors: Peter Thoeny - 2014-10-13

Discussion

Looks sensible and useful.

-- Hideyo Imazu - 2014-10-14

I am wondering if we should deprecate the M and H flags in favor of mandatory="1" and hidden="1", respectively. If we do we should keep the M and H for compatibility.

-- Peter Thoeny - 2014-10-14

Accepted by release meeting at KampalaReleaseMeeting2014x10x16.

The M and H flags should deprecate in favor of mandatory="1" and hidden="1", respectively.

-- Peter Thoeny - 2014-10-17

This is now done.

-- Peter Thoeny - 2014-12-16

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2014-12-16 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.