On Mon, Feb 9, 2009 at 1:10 PM, Hans - softflow.co.uk
<[email protected]> wrote:
>
>> But it is still processed at page build time. Not form submission
>> time...  The thought never occurred to me of having a way to evaluate
>> markup in form fields at time of form submission. Never had that in
>> zap either. We could escape it easily enough, but then would need some
>> syntax to indicate: "evaluate the markup on this form value". It is a
>> very intriguing idea. I'm open to suggestions for syntax.
>
> I found it useful for posts where it was important that the latest
> information was used, like for a new page creation using latest seial
> number, or time-stamping of posting time, instead of time the form was
> loaded, or doing some maths, like increasing  a number used in  a
> field, etc.
>
> Maybe there are other ways to achieve this, like you can add commands
> to be processed after form submission as a series of steps after the
> submit field.

BoltWire just has different mechanisms. For example target=some.page.#
is the latest serial number (+1) in the group and some.page.+ is a
timestamp, and there are many other shortcuts and commands.
Still--doing maths for example would probably take a custom command.

> For Fox I used a similar markup as is used in the templates:
> replacement variables in templates are like {$$var},
> standard expressions are like {(expr ......)},
> and expressions to be evaluated when posting are like {$$
> (expr ......)} in Fox.
>
> To keep in line with the variable and function markup in BoltWire,
> perhaps something like this:
> {+(function parameters)}
> A  function marked like this could be equally used in a form field or
> in a template, to be evaluated when the form is submitted, or the
> template processed (same thing if a template is used). Just make sure
> the expression gets evaluated after variable replacements in the
> template process.

This is an excellent and logical suggestion. You have the semantics of
our markup exactly right.  I want to think about it some more and see
if we really need this (our commands are quite powerful and easy to
extend). And I also want to explore perhaps a couple different options
for implementing it.

For example I'm considering some kind of markup like this:

[session field '/*some markup... etc*/']

Here, the markup would already be escaped and the Token passed to the
session field. All I would have to do then is add a line or two which
said if the value is a Token, unescape and flag somehow for
processing. Then when the form submits, the forms processor picks up
the flag, and renders the markup. I'd have to do some tinkering, but
the advantage is you could use regular markup without any additional
syntax. I also suspect it might be it easier to put multi-line values
in a session field without requiring them to pull in an external
template. Of course, we would then have to decide if we want to only
do certain markup rules or all of them? And how do we handle markup
that outputs html directly? Having a simple {+var} and
{+(func)}/[+(func)]/<+(func)> might actually be an easier solution.
Perhaps also a [+if] markup as well.

Thank you again for a great idea, Hans.  Any feedback from anyone else
on the list?

Cheers,
Dan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to