Major Feature #9446
Template parser
| Status: | Rejected | Start date: | 2010-08-25 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Christian Opitz | % Done: | 0% |
|
| Category: | Core | |||
| Target version: | Stable v1.0 | |||
| Votes: | 0 |
Description
The template parser should search for every tag and its attributes that could result in an POST-var on request. (inputs, textareas, selects)
This is usefull for some automatic methods like AutoDB, AutoValuePopulation, AutoValidation, AutoFiltering.
Associated revisions
implemented a experimental fluid-view (refs #9446)
implemented a experimental fluid-view (refs #9446)
refs #9446:
Two fluid view helpers for formhandler-forms (form and form.submit)
Added example fluid template
refs #9446:
Two fluid view helpers for formhandler-forms (form and form.submit)
Added example fluid template
Added simple translation-view-helper and updated example (refs #9446)
Added simple translation-view-helper and updated example (refs #9446)
Binding fh.form to gp works (refs #9446)
Binding fh.form to gp works (refs #9446)
Added new controller to allow fluid forms with multisteps and provide controllerContext at central place (refs #9446)
Added new controller to allow fluid forms with multisteps and provide controllerContext at central place (refs #9446)
History
Updated by Christian Opitz over 2 years ago
As Fluid already offers a template parser there is actually no need to write another one. Instead we could implement fluid-views at this point.
In the branch for this ticket is an already working example (Examples/Fluid). This uses two custom view helpers (form and form.submit) which allow formhandler to add step-information (form.submit) and it's hidden fields (form).
To realize fluid views i would suggest an conventional layout for form templates - maybe sth. like that:
mytemplate/ - forms/ -- (partials/) -- (layouts/) -- form1.html -- form2.html - lang/ -- lang.xml - css/ - js/
For templates with just one form this could even look more simple:
mytemplate/ - form.html - lang.xml - css/ - js/
With these structures we could tell fluid which form to use via the action-param in the request.
What do you think?
Updated by Christian Opitz over 2 years ago
Moved the functionality to use fluid-templates into a new extension called Formhandler on Fluid
It ships with some view helpers that make form-life much easyer:- Translation-ViewHelper: Let's you use translation from formhandler translation files
- Form-ViewHelper: Extends fluids view helper for compatibiltity with formhandler and has a new attribute readOnly that lets form elements output the proper values instead of the field-html
- Label-View-Helper: Adds error class to the label-tag when for-field has errors
- Improved Checkbox-ViewHelper
- format.html2txt: Filter that strips all html from the inner tags and keeps basic formating like unorderd lists, numbered lists, indention, underlining, italics, bolds, margins... Very usefull for plaintext-mails
- format.trim: Trim whitespace and empty lines
So in most cases you will be done with just one form that you can reuse in your email- or confirmation-templates with help of the partial-viewHelper in combination with readOnly-attribute and the format.html2txt-Helper.
So please close this issue
Updated by Reinhard Führicht over 2 years ago
- Status changed from New to Rejected
Issue rejected.
Reason:
Christian Opitz wrote:
Moved the functionality to use fluid-templates into a new extension called Formhandler on Fluid