> > Cees, you are right, as usual:-) and I wish I had RTFM more carefully.
> > I respect your explanation but on the other hand I dislike the idea that
> > CAP::FillInForm is not fully compatible with H::FillInForm by default.
> > It took me a few hours to find the problem. If the work isn't very
> > time-consuming I would vote for making it optional.
...
> I'm sorry this became a time-sink for you. However I agree with Cees
> that treating rm exceptionally is an intelligent choice for the plugin.
> As far as making it optional...calling HTML::FiF directly only takes
> two lines of code, and I would advocate going that route.
Actually, as it turns out, it is already optional and can be disabled
(if the user really wants to do such a thing):
$self->fill_form(\$html, $data, ignore_fields => undef);
This syntax is slightly cumbersome, but I agree with both you and Cees
that once you know how the module works, you're much better off setting
the runmode using a template variable instead of a filled-in field:
<form>
<input type="hidden" name="rm" value="<tmpl_var new_run_mode>">
<input name="field1">
<input name="field2">
<input name="field3">
</form>
I don't think that anybody starting from scratch would object to this
approach. But someone (like Wojciech) migrating from HTML::FillInForm
to CAP::FillInForm might get bitten by the subtle change in behaviour
and could waste a lot of time tracking down what looks like a subtle bug
but is in fact a feature.
So I think the best solution is to keep the module the way it is, but
more prominently document the run mode preservation feature and how to
disable it. I'll work on a doc patch.
Michael
---
Michael Graham <suppressed>
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.