ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* AW: AW: Two more questions
@ 1999-11-12 13:19 Haseloff, Lutz
  1999-11-12 15:02 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Haseloff, Lutz @ 1999-11-12 13:19 UTC (permalink / raw)


> Did you enable interaction by state=start?
> By default, context does reset a form 
> (otherwise acrobat has troubles with unitiated
> fields). Also, the default is to go to the first page. 

> openaction={firstpage,ResetForm}

> You can do a grep in the pdf file on resetform to check this. 

> Hans

Hi Hans,

I play with following file to get a field with the current date:
(my first try with JS)

\setupoutput [pdftex]
\setuppapersize[S6][S6]
\setupinteraction[state=start,
color=red,
openaction=ResetForm,
closeaction=ExitViewer]
\setupinteractionscreen[option=max]
\setupcolors[state=start]
\startJScode{Datum}
  { this.d = new Date();
    event.value = util.printd("dd. mmmm yyyy", d); }
\stopJScode
\setupfield [DatumSetup] [frame=off,width=8cm,height=7mm,validate=JS(Datum)]
\definefield [datum] [line] [DatumSetup]
\starttext
today is the: \raise-2.2mm\hbox{\field[datum]}

\goto{Reset}[ResetForm]
\stoptext

when i open the pdf with acrobat reader the field is empty.
i must click on the link with the same reference
or fill something in the field and press enter.
with acrobat exchange i found no openaction in the pdf.
is there a smarter way to define such a date field?

Lutz


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-12 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-12 13:19 AW: AW: Two more questions Haseloff, Lutz
1999-11-12 15:02 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).