Re: [Formsess-devel] Patch: Smarty-vars & functions as tag-attributes
Status: Beta
Brought to you by:
mrkatana
|
From: Katana <ka...@ka...> - 2004-02-02 22:53:59
|
David,
> here's a patch that completes my attempt to make it possible to use
> smarty-vars & functions as tag-attributes.
> What do you think about it?
> (It requires changes in all FormsessTag/* files, I changed only
> input.class.php, if you like it I can modify the others too..)
With a small delay I finally answer your message...
Thanks a lot for the patch. I gave it a quick look, but I guess it's too
late for my brain to automatically transform diff output to real code;
anyway I think what I've gathered from the approach is ok.
I'll dig more into it asap (tomorrow hopefully) and keep you informed
about the results.
> @Katana: is there anything I can help you to get the CVS version
> working soon?
Not yet. But guess what ? It's almost working ! Most tags are ok, even
if I know ther are a few bugs (I've found one or two while porting the
validators), and several validators were already ported to the new OO model.
The following validators are working, on both server & client sides:
- checked
- empty
- hasExtension
- identical
- size
- syntax
In 2.0.0 there are 25 files: 10 client + server side validators, and 5
server side only. At the moment we have 6 server + client side
validators converted, which makes 4 c + s side validators and 5 s side
only validators to convert. Not much as far as I can say :)
There are still a few inconsistencies in the OO model, but nothing huge.
Whatever, here is the big word: you can checkout the HEAD version and
attempt to run it, you should not get any BIG surprise. I guess it's a
nice step forward.
By the way, while I'm writing another long email, here is a question /
remark: how would you approach the problems of client side validators
and dynamic forms (e.g. fields located in a control structure / loop) ?
Since Client Side validation is handled by a prefilter, no logic is when
the JS code is generated, making it impossible to generate proper code.
I have a little idea about how to implement it, but it's still a dirty
draft, with nothing even written down, only ideas in my head.
Another critical topic is "splitting forms in several files". How many
times didn't I answer "no, formsess can't do that" when I'm asked why
strange error messages appear when a template contains something like
<fs:form...>{include file="_form.tpl"}</fs:form>
For this one I don't have an accurate idea yet but I'm sure it's possible :)
Anyway, any idea / suggestion / slap about these improvements is welcome :)
Yours,
Katana
|