Hi, coming back to an old form project I find that something changed WRT to form fields. For one, some fields appear smaller and shifted upwards – I managed to fix that with setups. What I can’t change is behaviour of radiobuttons: if I click one, all rbs of one group activate, and I can’t deactivate them any more. In my project all of the fields are duplicated on other pages, and while all other fields’ contents get copied, it doesn’t work for radiobuttons; my minimal example unfortunately can’t show that. \setupinteraction[state=start] \setupfield[MMradio][ option=printable, frame=overlay, corner=round, height=1em, width=1em, align=bottom, ] \definefield[chooseTeX][radio][MMradio][rbContext,rbLatex,rbOther][rbContext] \definesubfield[rbContext][][] \definesubfield[rbLatex][][] \definesubfield[rbOther][][] \starttext I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ \field[rbOther] other. \page Just to confirm: I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ \field[rbOther] other. \stoptext Greetlings, Hraban
Of course the behaviour depends on the PDF viewer… :-( In Acrobat Pro 9 the radiobuttons work while I highlight form fields; if I switch that off, all options are checked. In Adobe Reader DC you can’t switch off form field highlighting. Preview.app only highlights on mouseover and checks all radiobuttons. PDF Studio (that I try to establish as a cheap alternative to Acrobat Pro) sometimes shows an error after asking if I’d like to activate JavaScript and won’t open my form document at all. Since I need also a non-interactive version for printout, and since ConTeXt doesn’t reserve the space of form fields if I switch off interaction, I used to remove form fields with Acrobat. In previous versions (I can prove 2018-11) ConTeXt used its own frames for radiobuttons and checkboxes. Now it seems to use options of the PDF form fields that look different in viewers and disappear if I delete the field… Custom symbols of radiobuttons and checkboxes are displayed constantly (that used to work only in MkII 10 years before or so, probably due to changes in Acrobat), and it’s not possible to use different symbols for checkend and unchecked 😭😤 Hraban
Am 2019-08-05 um 10:03 schrieb Henning Hraban Ramm
: Hi, coming back to an old form project I find that something changed WRT to form fields.
For one, some fields appear smaller and shifted upwards – I managed to fix that with setups.
What I can’t change is behaviour of radiobuttons: if I click one, all rbs of one group activate, and I can’t deactivate them any more.
In my project all of the fields are duplicated on other pages, and while all other fields’ contents get copied, it doesn’t work for radiobuttons; my minimal example unfortunately can’t show that.
\setupinteraction[state=start]
\setupfield[MMradio][ option=printable, frame=overlay, corner=round, height=1em, width=1em, align=bottom, ]
\definefield[chooseTeX][radio][MMradio][rbContext,rbLatex,rbOther][rbContext] \definesubfield[rbContext][][] \definesubfield[rbLatex][][] \definesubfield[rbOther][][]
\starttext
I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ \field[rbOther] other.
\page
Just to confirm: I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ \field[rbOther] other.
\stoptext
Greetlings, Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
This is a feature request or wish: I would be glad to have a module (e.g. "fakefields") as a drop-in replacement that overwrites the field commands (\setupfield, \definefield, \definesubfield, \field) with a version that doesn’t create form fields but just \inframeds that look the same. \setupfield[setup name][options][keyval options] would map to \defineframed[setup name][keyval options] \definefield[name][type][setup name][content values][default content] would map to \defineframed[nameField][keyval options] and inherit (how?) from "class name". Don’t know how \definesubfield would work and how to setup the relationship to a special radiobutton type. \field[name] would finally call \nameField{} \setupfields doesn’t work anyway. e.g. \setupfield[MMshortString][reset,horizontal][width=45mm,option=printable,frame=off,bottomframe=on,height=2em,offset=0.5mm,frameoffset=1mm] \definefield[Name][line][MMshortString][] \field[Name] would result in \inframed[width=45mm,frame=off,bottomframe=on,height=2em,offset=0.5mm,frameoffset=1mm]{} while \setupfield[MMradio][frame=on, corner=round, height=0.75em, width=0.75em, align=bottom, offset=-0.5mm, frameoffset=0mm] \definefield[GRB][radio][MMradio][RByes,RBno][RByes] \definesubfield[RByes][][] \definesubfield[RBno][][] \field[RByes] I agree. \field[RBno] I don’t agree. would result in \inframed[frame=on, corner=round, height=0.75em, width=0.75em, align=bottom, offset=-0.5mm, frameoffset=0m]{} I agree. I’d try it myself, but I know it’s over my head. I guess I loverlooked something important. But probably it’s quite easy to do in Lua? Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
Henning Hraban Ramm schrieb am 05.08.2019 um 15:10:
Of course the behaviour depends on the PDF viewer… :-( In Acrobat Pro 9 the radiobuttons work while I highlight form fields; if I switch that off, all options are checked. In Adobe Reader DC you can’t switch off form field highlighting. Preview.app only highlights on mouseover and checks all radiobuttons. PDF Studio (that I try to establish as a cheap alternative to Acrobat Pro) sometimes shows an error after asking if I’d like to activate JavaScript and won’t open my form document at all.
Since I need also a non-interactive version for printout, and since ConTeXt doesn’t reserve the space of form fields if I switch off interaction, I used to remove form fields with Acrobat. In previous versions (I can prove 2018-11) ConTeXt used its own frames for radiobuttons and checkboxes. Now it seems to use options of the PDF form fields that look different in viewers and disappear if I delete the field…
Custom symbols of radiobuttons and checkboxes are displayed constantly (that used to work only in MkII 10 years before or so, probably due to changes in Acrobat), and it’s not possible to use different symbols for checkend and unchecked
😭😤
Hraban
Am 2019-08-05 um 10:03 schrieb Henning Hraban Ramm
: Hi, coming back to an old form project I find that something changed WRT to form fields.
For one, some fields appear smaller and shifted upwards – I managed to fix that with setups.
What I can’t change is behaviour of radiobuttons: if I click one, all rbs of one group activate, and I can’t deactivate them any more.
In my project all of the fields are duplicated on other pages, and while all other fields’ contents get copied, it doesn’t work for radiobuttons; my minimal example unfortunately can’t show that.
\setupinteraction[state=start]
\setupfield[MMradio][ option=printable, frame=overlay, corner=round, height=1em, width=1em, align=bottom, ] Use (with "framed" in the second optional argument)
\setupfield [MMradio] [framed] [..,..=..,..] to get normal framed fields. Wolfgang
Regardless of my other mails, I’d appreciate to have this bug fixed. Greetlings, Hraban
Am 2019-08-05 um 10:03 schrieb Henning Hraban Ramm
: Hi, coming back to an old form project I find that something changed WRT to form fields.
For one, some fields appear smaller and shifted upwards – I managed to fix that with setups.
What I can’t change is behaviour of radiobuttons: if I click one, all rbs of one group activate, and I can’t deactivate them any more.
In my project all of the fields are duplicated on other pages, and while all other fields’ contents get copied, it doesn’t work for radiobuttons; my minimal example unfortunately can’t show that.
\setupinteraction[state=start]
\setupfield[MMradio][ option=printable, frame=overlay, corner=round, height=1em, width=1em, align=bottom, ]
\definefield[chooseTeX][radio][MMradio][rbContext,rbLatex,rbOther][rbContext] \definesubfield[rbContext][][] \definesubfield[rbLatex][][] \definesubfield[rbOther][][]
\starttext
I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ \field[rbOther] other.
\page
Just to confirm: I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ \field[rbOther] other.
\stoptext
Greetlings, Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 8/13/2019 8:01 PM, Henning Hraban Ramm wrote:
Regardless of my other mails, I’d appreciate to have this bug fixed.
Last time I checked this (widget crap) there was an issue with acrobat and apearances ... I think that this model of parents and kids never really worked well and when one switches a page existing renderings get messed up. Irr some of these widgets (check boxes?) can't even have a custom visualization any more that is kept when one goes through pages. I also have no clue to what extend all this is part of the 'standard'. Anyway, if you can make a working example (uncompressed pdf) in official acrobat (not some other tool) that works in acrobat reader we can maybe figure out what todays demands are. Implementing stuff like this is trivial but the trial and error is painful. Hans (I only have acrobat X and reader for checking this.) \nopdfcompression \setupinteraction [state=start] \definesymbol[yes][1] \definesymbol[nop][0] \setupfield[whatever][width=20mm,height=20mm,frame=off] \definefield[what][radio][whatever][whatone,whattwo][whatone] \definesubfield[whatone][][yes,nop] \definesubfield[whattwo][][yes,nop] \setupfield[textstuff][horizontal][width=50mm,height=15mm,offset=0pt,option={printable},offset=overlay] \definefield[whatthree][text][textstuff] \starttext \startTEXpage[offset=2cm] \field[whatone]\space\field[whattwo]\space\field[whatthree] \stopTEXpage % \startTEXpage[offset=2cm] % \field[whatone]\space\field[whattwo]\space\field[whatthree] % \stopTEXpage \stoptext
Greetlings, Hraban
Am 2019-08-05 um 10:03 schrieb Henning Hraban Ramm
: Hi, coming back to an old form project I find that something changed WRT to form fields.
For one, some fields appear smaller and shifted upwards – I managed to fix that with setups.
What I can’t change is behaviour of radiobuttons: if I click one, all rbs of one group activate, and I can’t deactivate them any more.
In my project all of the fields are duplicated on other pages, and while all other fields’ contents get copied, it doesn’t work for radiobuttons; my minimal example unfortunately can’t show that.
\setupinteraction[state=start]
\setupfield[MMradio][ option=printable, frame=overlay, corner=round, height=1em, width=1em, align=bottom, ]
\definefield[chooseTeX][radio][MMradio][rbContext,rbLatex,rbOther][rbContext] \definesubfield[rbContext][][] \definesubfield[rbLatex][][] \definesubfield[rbOther][][]
\starttext
I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ \field[rbOther] other.
\page
Just to confirm: I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ \field[rbOther] other.
\stoptext
Greetlings, Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am 2019-08-14 um 22:09 schrieb Wolfgang Schuster
:
Use (with "framed" in the second optional argument)
\setupfield [MMradio] [framed] [..,..=..,..]
to get normal framed fields.
I already had "framed=on" as part of my setup. *** I found a ConTeXt beta from February 2019 on my laptop, and there it works as it should. i.e. frames are there, and radiobuttons are single-select. ***
Am 2019-08-14 um 19:20 schrieb Hans Hagen
: On 8/13/2019 8:01 PM, Henning Hraban Ramm wrote:
Regardless of my other mails, I’d appreciate to have this bug fixed.
Last time I checked this (widget crap) there was an issue with acrobat and apearances ... I think that this model of parents and kids never really worked well and when one switches a page existing renderings get messed up. Irr some of these widgets (check boxes?) can't even have a custom visualization any more that is kept when one goes through pages.
I also have no clue to what extend all this is part of the 'standard'.
Anyway, if you can make a working example (uncompressed pdf) in official acrobat (not some other tool) that works in acrobat reader we can maybe figure out what todays demands are. Implementing stuff like this is trivial but the trial and error is painful.
Hans
(I only have acrobat X and reader for checking this.)
I can understand your annoyance about Adobe – I recently switched Acrobat Pro with Qoppa PDF Studio Pro that contains most of AcroPro’s functions (including PDF/X and PDF/A check), since my Acrobat Pro 9 doesn’t work on OSX Mojave any more (it starts, but a lot of features won’t work), and I don’t want to pay monthly for their bloated crap. PDF Studio lacks LiveCycle forms support (unfortunately those are used by some German authority bodies), and it can’t display CropBox, TrimBox etc outside of the cropping tool; I placed a feature request, maybe they’ll implement it; their email support was very quick, friendly and helpful. Neither Acrobat (Pro 9) nor PDF Studio can save uncompressed PDFs. (I know old versions of AcroPro could.) I "customized" the checkbox as it was possible within Acrobat; I found no options to use custom symbols (I know it worked in Acrobat 5-7). Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
Am 2019-08-15 um 22:40 schrieb Henning Hraban Ramm
: Am 2019-08-14 um 22:09 schrieb Wolfgang Schuster
: Use (with "framed" in the second optional argument)
\setupfield [MMradio] [framed] [..,..=..,..]
to get normal framed fields.
I already had "framed=on" as part of my setup.
*** I found a ConTeXt beta from February 2019 on my laptop, and there it works as it should. i.e. frames are there, and radiobuttons are single-select. ***
Arrgh, now I can’t reproduce it any more. I don’t know what I looked at. HR
Regardless of my other mails, I’d appreciate to have this bug fixed. I wasted the whole day on trying all kind of tricks and comparing pdf's made with acronbat and context etc etc just to find out that the
On 8/13/2019 8:01 PM, Henning Hraban Ramm wrote: preference is the problem ... forms -> highlight color -> show border hover color it badly interfering with these widgets ... there seems to be no way to turn that off (forms made with acrobat suffer a bit less because they use a funny mix of appearances and border settings and ... because they make these buttons from dingbats (i think) anyway, it's bad in the latest reader as well as in acrobat x which shows it's an old issue and as it's that old one can fear it has become a feature ... (of that no one cares) so, the only solution seems to be to check the prefs (mupdf is doing it right) Hans --- test file --- \setupinteraction [state=start] \definesymbol[yes][1] \definesymbol[nop][0] \setupfield[whatever][width=20mm,height=20mm,frame=off] \definefield[what][radio][whatever][whatone,whattwo][whatone] \definesubfield[whatone][][yes,nop] \definesubfield[whattwo][][yes,nop] \startuniqueMPgraphic{0} fill fullcircle scaled 1cm withcolor red ; \stopuniqueMPgraphic \startuniqueMPgraphic{1} fill fullcircle scaled 1cm withcolor green ; \stopuniqueMPgraphic \definesymbol[YES][\uniqueMPgraphic{1}] \definesymbol[NOP][\uniqueMPgraphic{0}] \setupfield[WHATEVER][width=20mm,height=20mm,frame=off] \definefield[WHAT][radio][WHATEVER][WHATONE,WHATTWO][WHATONE] \definesubfield[WHATONE][][YES,NOP] \definesubfield[WHATTWO][][YES,NOP] \starttext \startTEXpage[offset=2cm] \field[whatone]\space\field[whattwo] \field[WHATONE]\space\field[WHATTWO] \field[WHATONE]\space\field[WHATTWO] \stopTEXpage \startTEXpage[offset=2cm] \field[whatone]\space\field[whattwo] \field[WHATONE]\space\field[WHATTWO] \field[WHATONE]\space\field[WHATTWO] \stopTEXpage \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Henning Hraban Ramm
-
Wolfgang Schuster