Here are  a couple problems I see:

[command pubdatestamp [(time {=pubdate})] ]

Here you have an order of processing problem. The function [(time...)] is
processed immediately when the page is loaded, whereas the field
replacement {=pubdate} only occurs after the form submits, because it is
based on user input.

What you could try is

[command time_pubtime '{=pubdate}']
[command pubdatestamp '{=time_pubtime}']

The first takes the user input and does the same thing as the time
function, only as a command, ie after user input.
The second inserts that value into the variable name you chose.

[command pubdatestampdummy [(time "2012-03-18")] ]

Try rewriting the function like this: [(time fmt=timestamp "2012-03-18")]
 It looks like there may still be some glitches in the logic of the time
function when both time and format are not specified. I'll look at it some
more and see if I can't improve it.

Cheers,
Dan


On Fri, Jun 14, 2013 at 7:34 AM, jacmgr <[email protected]> wrote:

> OK.  I try this form on an existing page.  But I think I lost my
>>> understanding of making boltwire form.
>>>
>>
> !!FORM to ADD SOME DATA FIELD TO A PAGE
> /* EXISTING DATA FIELDS pubdate, pubtime
>    Adding fields pubdatestamp which is just time stamp of pubdate etc...
> */
> [form id=boltform]
> Publish On:   [text pubdate "{:pubdate}" size=14]
> Publish Time: [text pubtime "{:pubtime}" size=14]
> [submit name=submit value='SAVE']
> [command target {p}]
> /* create a timestamp of whatever was entered above in pubdate */
> [command pubdatestamp [(time {=pubdate})] ]
> [command pubdatestampdummy [(time "2012-03-18")] ]
> [command pubdatestampdummy2 [(time {now})] ]
> [command savedata page={=page}
> pubdate,pubtime,pubdatestamp,pubdatestampdummy,pubdatestampdummy2]
>
> [form]
>
> The result of the form is that pubdate and pubtime are correct;
> pubdatestampdummy2 is correct; but pubdatestamp, and datstamp dummy are not
> correct.
> See result:
> ~
> pubdate: 2013-06-14
> ~
> pubtime: 9:08:00 PM
> ~
> pubdatestamp: {=pubdate}
> ~
> pubdatestampdummy: 2012-03-18
> ~
> pubdatestampdummy2: 1371213064
> ~
>
> Any advice to get that to work?
>
> --
> You received this message because you are subscribed to the Google Groups
> "BoltWire" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/boltwire.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/boltwire.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to