ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Issue with interactive checkboxes
@ 2022-05-23 11:11 Jan-Erik Hägglöf via ntg-context
  2022-05-23 19:59 ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Jan-Erik Hägglöf via ntg-context @ 2022-05-23 11:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jan-Erik Hägglöf


[-- Attachment #1.1: Type: text/plain, Size: 673 bytes --]

HI!

Tried to make a checklist in an interactive document.

The problem seems to be that all checks/uncecks in same click, not each individually.

Is there something wrong with my code?

See attached below

\setupinteraction[state=start]
\setupexternalfigures[location=global]
\usemodule[fields]
\definesymbol [yes] [{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol [no] []


\setupfield
[setup 3]
[width=0.5cm, height=0.5cm,
rulethickness=1pt, corner=round, framecolor=red]


\definefield [check-me] [check] [setup 3] [yes,no] [no]

\define\chk{\field[check-me]}

\starttext

\chk
\blank[3cm]
\chk

\stoptext


[-- Attachment #1.2.1: Type: text/html, Size: 1711 bytes --]

[-- Attachment #1.2.2: exempel1.pdf --]
[-- Type: application/pdf, Size: 6502 bytes --]

[-- Attachment #1.2.3: Type: text/html, Size: 197 bytes --]

[-- Attachment #1.2.4: check-mark-svgrepo-com.svg --]
[-- Type: image/svg+xml, Size: 1415 bytes --]

[-- Attachment #1.2.5: Type: text/html, Size: 206 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Issue with interactive checkboxes
  2022-05-23 11:11 Issue with interactive checkboxes Jan-Erik Hägglöf via ntg-context
@ 2022-05-23 19:59 ` Pablo Rodriguez via ntg-context
  2022-05-24  5:44   ` Jan-Erik Hägglöf via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-05-23 19:59 UTC (permalink / raw)
  To: Jan-Erik Hägglöf via ntg-context; +Cc: Pablo Rodriguez

On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
> HI!
>
> Tried to make a checklist in an interactive document.
>
> The problem seems to be that all checks/uncecks in same click, not each
> individually.
>
> Is there something wrong with my code?

Hi Jan-Erik,

you basically put the same field twice.

Add something like:

  \definefield [check-you] [check] [setup 3] [yes,no] [no]

  \define\chka{\field[check-you]}

  \chka

Checks will be different then.

I hope it helps,

Pablo
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Issue with interactive checkboxes
  2022-05-23 19:59 ` Pablo Rodriguez via ntg-context
@ 2022-05-24  5:44   ` Jan-Erik Hägglöf via ntg-context
  2022-05-24  6:08     ` Jan-Erik Hägglöf via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Jan-Erik Hägglöf via ntg-context @ 2022-05-24  5:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users
  Cc: Jan-Erik Hägglöf, Pablo Rodriguez

Thank you, unfortunately it has no effect. Even if I make a macro, still it is the same field.

> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>:
> 
> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
>> HI!
>> 
>> Tried to make a checklist in an interactive document.
>> 
>> The problem seems to be that all checks/uncecks in same click, not each
>> individually.
>> 
>> Is there something wrong with my code?
> 
> Hi Jan-Erik,
> 
> you basically put the same field twice.
> 
> Add something like:
> 
>  \definefield [check-you] [check] [setup 3] [yes,no] [no]
> 
>  \define\chka{\field[check-you]}
> 
>  \chka
> 
> Checks will be different then.
> 
> I hope it helps,
> 
> Pablo
> ___________________________________________________________________________________
> 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
___________________________________________________________________________________

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

* Re: Issue with interactive checkboxes
  2022-05-24  5:44   ` Jan-Erik Hägglöf via ntg-context
@ 2022-05-24  6:08     ` Jan-Erik Hägglöf via ntg-context
  2022-05-24  8:18       ` Issue with interactive checkboxes[solved] Jan-Erik Hägglöf via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Jan-Erik Hägglöf via ntg-context @ 2022-05-24  6:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users
  Cc: Jan-Erik Hägglöf, Pablo Rodriguez


[-- Attachment #1.1: Type: text/plain, Size: 2479 bytes --]

I’ve tried this

\setupinteraction[state=start]

\definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol[no][]

\newcount\chk
\def\chk{%
\global \advance \chk by 1
\setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, framecolor=red]%
\definefield[checkme\the\chk][check][setup1][yes,no][no]%
\field[checkme\the\chk]%
}

\starttext

\chk

\chk

\chk

\stoptext

But it gives the error ” You can’t use \global after \advance”

But this example works fine

\setupinteraction[state=start]

\newcount\clozecount
\def\mycloze{%
  \global \advance \clozecount by 1
  \definefield[uniqcloze\the\clozecount][line]%
  \field[uniqcloze\the\clozecount]%
}

\starttext

Frogs have four \mycloze\ and two eyes.
Frogs have four \mycloze\ and two eyes.
Frogs have four \mycloze\ and two eyes.
Frogs have four \mycloze\ and two eyes.

\stoptext

From 

https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in

> 24 maj 2022 kl. 07:44 skrev Jan-Erik Hägglöf <skrantajanneman@gmail.com>:
> 
> Thank you, unfortunately it has no effect. Even if I make a macro, still it is the same field.
> 
>> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>:
>> 
>> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
>>> HI!
>>> 
>>> Tried to make a checklist in an interactive document.
>>> 
>>> The problem seems to be that all checks/uncecks in same click, not each
>>> individually.
>>> 
>>> Is there something wrong with my code?
>> 
>> Hi Jan-Erik,
>> 
>> you basically put the same field twice.
>> 
>> Add something like:
>> 
>> \definefield [check-you] [check] [setup 3] [yes,no] [no]
>> 
>> \define\chka{\field[check-you]}
>> 
>> \chka
>> 
>> Checks will be different then.
>> 
>> I hope it helps,
>> 
>> Pablo
>> ___________________________________________________________________________________
>> 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
>> ___________________________________________________________________________________
> 


[-- Attachment #1.2: Type: text/html, Size: 18092 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Issue with interactive checkboxes[solved]
  2022-05-24  6:08     ` Jan-Erik Hägglöf via ntg-context
@ 2022-05-24  8:18       ` Jan-Erik Hägglöf via ntg-context
  2022-05-24 16:43         ` Pablo Rodriguez via ntg-context
  2022-05-24 21:08         ` Jan-Erik Hägglöf via ntg-context
  0 siblings, 2 replies; 9+ messages in thread
From: Jan-Erik Hägglöf via ntg-context @ 2022-05-24  8:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users
  Cc: Jan-Erik Hägglöf, Pablo Rodriguez


[-- Attachment #1.1: Type: text/plain, Size: 3753 bytes --]

HI Again!

I discovered what went wrong, such a silly syntax error, here comes a working code:

\setupinteraction[state=start]

\definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol[no][]

\newcount\chk
\def\checkmark{%
\global\advance\chk by 1
\setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, framecolor=red]%
\definefield[checkme\the\chk][check][setup1][yes,no][no]%
\field[checkme\the\chk]%
}

\starttext

\checkmark\

\checkmark\

\checkmark\

\stoptext

Sorry to bother the list but maybe it is helpful for someone.

Regards

/Jan-Erik

> 24 maj 2022 kl. 08:08 skrev Jan-Erik Hägglöf <skrantajanneman@gmail.com>:
> 
> I’ve tried this
> 
> \setupinteraction[state=start]
> 
> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
> \definesymbol[no][]
> 
> \newcount\chk
> \def\chk{%
> \global \advance \chk by 1
> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, framecolor=red]%
> \definefield[checkme\the\chk][check][setup1][yes,no][no]%
> \field[checkme\the\chk]%
> }
> 
> \starttext
> 
> \chk
> 
> \chk
> 
> \chk
> 
> \stoptext
> 
> But it gives the error ” You can’t use \global after \advance”
> 
> But this example works fine
> 
> \setupinteraction[state=start]
> 
> \newcount\clozecount
> \def\mycloze{%
>   \global \advance \clozecount by 1
>   \definefield[uniqcloze\the\clozecount][line]%
>   \field[uniqcloze\the\clozecount]%
> }
> 
> \starttext
> 
> Frogs have four \mycloze\ and two eyes.
> Frogs have four \mycloze\ and two eyes.
> Frogs have four \mycloze\ and two eyes.
> Frogs have four \mycloze\ and two eyes.
> 
> \stoptext
> 
> From 
> 
> https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in <https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in>
> 
>> 24 maj 2022 kl. 07:44 skrev Jan-Erik Hägglöf <skrantajanneman@gmail.com <mailto:skrantajanneman@gmail.com>>:
>> 
>> Thank you, unfortunately it has no effect. Even if I make a macro, still it is the same field.
>> 
>>> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context <ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>>:
>>> 
>>> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
>>>> HI!
>>>> 
>>>> Tried to make a checklist in an interactive document.
>>>> 
>>>> The problem seems to be that all checks/uncecks in same click, not each
>>>> individually.
>>>> 
>>>> Is there something wrong with my code?
>>> 
>>> Hi Jan-Erik,
>>> 
>>> you basically put the same field twice.
>>> 
>>> Add something like:
>>> 
>>> \definefield [check-you] [check] [setup 3] [yes,no] [no]
>>> 
>>> \define\chka{\field[check-you]}
>>> 
>>> \chka
>>> 
>>> Checks will be different then.
>>> 
>>> I hope it helps,
>>> 
>>> Pablo
>>> ___________________________________________________________________________________
>>> If your question is of interest to others as well, please add an entry to the Wiki!
>>> 
>>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context>
>>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/>
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/>
>>> wiki     : http://contextgarden.net <http://contextgarden.net/>
>>> ___________________________________________________________________________________
>> 
> 


[-- Attachment #1.2: Type: text/html, Size: 19908 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Issue with interactive checkboxes[solved]
  2022-05-24  8:18       ` Issue with interactive checkboxes[solved] Jan-Erik Hägglöf via ntg-context
@ 2022-05-24 16:43         ` Pablo Rodriguez via ntg-context
  2022-05-24 17:58           ` Henning Hraban Ramm via ntg-context
  2022-05-24 21:08         ` Jan-Erik Hägglöf via ntg-context
  1 sibling, 1 reply; 9+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-05-24 16:43 UTC (permalink / raw)
  To: Jan-Erik Hägglöf via ntg-context; +Cc: Pablo Rodriguez

[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]

On 5/24/22 10:18, Jan-Erik Hägglöf via ntg-context wrote:
> HI Again!
>
> I discovered what went wrong, such a silly syntax error, here comes a
> working code:

Hi Jan-Erik,

this will also make it:

  \setupinteraction[state=start]
  \definesymbol [yes] [{\externalfigure[on.svg][conversion=mp]}]
  \definesymbol [no] [{\externalfigure[off.svg][conversion=mp]}]

  \setupfield[setup3][width=2ex, height=2ex]

  \dorecurse{3}
  {\definefield [check-\recurselevel] [check] [setup3] [yes,no] [no]}

  \setupbodyfont[sans, 30pt]

  \starttext
  \startTEXpage[offset=1em, foregroundstyle=\ssbf]

  \dorecurse{3}
    {\field[check-\recurselevel]\
      option \recurselevel\blank[1ex]}
  \stopTEXpage
  \stoptext

But what I experienced in Acrobat Reader DC (on a borrowed computer) is
that you get the standard image (only when field is enabled) when you
click elsewhere in the document.

I guess that this may be related to a missing implementation, but first
I would like to confirm you are experiencing the same.

Best,

Pablo

[-- Attachment #2: off.svg --]
[-- Type: image/svg+xml, Size: 1763 bytes --]

[-- Attachment #3: on.svg --]
[-- Type: image/svg+xml, Size: 1649 bytes --]

[-- Attachment #4: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Issue with interactive checkboxes[solved]
  2022-05-24 16:43         ` Pablo Rodriguez via ntg-context
@ 2022-05-24 17:58           ` Henning Hraban Ramm via ntg-context
  2022-05-25 17:52             ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-05-24 17:58 UTC (permalink / raw)
  To: ntg-context; +Cc: Henning Hraban Ramm

Am 24.05.22 um 18:43 schrieb Pablo Rodriguez via ntg-context:
> But what I experienced in Acrobat Reader DC (on a borrowed computer) is
> that you get the standard image (only when field is enabled) when you
> click elsewhere in the document.
> 
> I guess that this may be related to a missing implementation, but first
> I would like to confirm you are experiencing the same.

Custom checkboxes and radiobuttons used to work many years ago, but 
they’re broken for years – Hans blames Adobe for that.

Your example works well in Apple Preview, Acrobat Pro 9 (2010), Skim, 
TeXshop, Safari, File Viewer. All of these use Apple’s PDF library, 
except the old Acrobat.

Foxit Reader, Master PDF Editor, Opera, Firefox never show the custom 
icons but the default checkmark (Firefox a cross).
PDF Studio 2019 doesn’t even that but shows a "4".
PDF.js in Atom doesn’t support forms (but show the red icon).

(I tested on MacOS 10.14.)

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
___________________________________________________________________________________

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

* Re: Issue with interactive checkboxes[solved]
  2022-05-24  8:18       ` Issue with interactive checkboxes[solved] Jan-Erik Hägglöf via ntg-context
  2022-05-24 16:43         ` Pablo Rodriguez via ntg-context
@ 2022-05-24 21:08         ` Jan-Erik Hägglöf via ntg-context
  1 sibling, 0 replies; 9+ messages in thread
From: Jan-Erik Hägglöf via ntg-context @ 2022-05-24 21:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users
  Cc: Jan-Erik Hägglöf, Pablo Rodriguez


[-- Attachment #1.1: Type: text/plain, Size: 4150 bytes --]

I’ve tested on my Mac OS Monterey 12.3.1 and the same phenomena as firefox it also is on google chrome.



> 24 maj 2022 kl. 10:18 skrev Jan-Erik Hägglöf <skrantajanneman@gmail.com>:
> 
> HI Again!
> 
> I discovered what went wrong, such a silly syntax error, here comes a working code:
> 
> \setupinteraction[state=start]
> 
> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
> \definesymbol[no][]
> 
> \newcount\chk
> \def\checkmark{%
> \global\advance\chk by 1
> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, framecolor=red]%
> \definefield[checkme\the\chk][check][setup1][yes,no][no]%
> \field[checkme\the\chk]%
> }
> 
> \starttext
> 
> \checkmark\
> 
> \checkmark\
> 
> \checkmark\
> 
> \stoptext
> 
> Sorry to bother the list but maybe it is helpful for someone.
> 
> Regards
> 
> /Jan-Erik
> 
>> 24 maj 2022 kl. 08:08 skrev Jan-Erik Hägglöf <skrantajanneman@gmail.com <mailto:skrantajanneman@gmail.com>>:
>> 
>> I’ve tried this
>> 
>> \setupinteraction[state=start]
>> 
>> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
>> \definesymbol[no][]
>> 
>> \newcount\chk
>> \def\chk{%
>> \global \advance \chk by 1
>> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, framecolor=red]%
>> \definefield[checkme\the\chk][check][setup1][yes,no][no]%
>> \field[checkme\the\chk]%
>> }
>> 
>> \starttext
>> 
>> \chk
>> 
>> \chk
>> 
>> \chk
>> 
>> \stoptext
>> 
>> But it gives the error ” You can’t use \global after \advance”
>> 
>> But this example works fine
>> 
>> \setupinteraction[state=start]
>> 
>> \newcount\clozecount
>> \def\mycloze{%
>>   \global \advance \clozecount by 1
>>   \definefield[uniqcloze\the\clozecount][line]%
>>   \field[uniqcloze\the\clozecount]%
>> }
>> 
>> \starttext
>> 
>> Frogs have four \mycloze\ and two eyes.
>> Frogs have four \mycloze\ and two eyes.
>> Frogs have four \mycloze\ and two eyes.
>> Frogs have four \mycloze\ and two eyes.
>> 
>> \stoptext
>> 
>> From 
>> 
>> https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in <https://tex.stackexchange.com/questions/560042/how-to-create-unique-clozes-in-context-in-a-pdf-that-users-can-type-in>
>> 
>>> 24 maj 2022 kl. 07:44 skrev Jan-Erik Hägglöf <skrantajanneman@gmail.com <mailto:skrantajanneman@gmail.com>>:
>>> 
>>> Thank you, unfortunately it has no effect. Even if I make a macro, still it is the same field.
>>> 
>>>> 23 maj 2022 kl. 21:59 skrev Pablo Rodriguez via ntg-context <ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>>:
>>>> 
>>>> On 5/23/22 13:11, Jan-Erik Hägglöf via ntg-context wrote:
>>>>> HI!
>>>>> 
>>>>> Tried to make a checklist in an interactive document.
>>>>> 
>>>>> The problem seems to be that all checks/uncecks in same click, not each
>>>>> individually.
>>>>> 
>>>>> Is there something wrong with my code?
>>>> 
>>>> Hi Jan-Erik,
>>>> 
>>>> you basically put the same field twice.
>>>> 
>>>> Add something like:
>>>> 
>>>> \definefield [check-you] [check] [setup 3] [yes,no] [no]
>>>> 
>>>> \define\chka{\field[check-you]}
>>>> 
>>>> \chka
>>>> 
>>>> Checks will be different then.
>>>> 
>>>> I hope it helps,
>>>> 
>>>> Pablo
>>>> ___________________________________________________________________________________
>>>> If your question is of interest to others as well, please add an entry to the Wiki!
>>>> 
>>>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context>
>>>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/>
>>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/>
>>>> wiki     : http://contextgarden.net <http://contextgarden.net/>
>>>> ___________________________________________________________________________________
>>> 
>> 
> 


[-- Attachment #1.2: Type: text/html, Size: 20624 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Issue with interactive checkboxes[solved]
  2022-05-24 17:58           ` Henning Hraban Ramm via ntg-context
@ 2022-05-25 17:52             ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 9+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-05-25 17:52 UTC (permalink / raw)
  To: Henning Hraban Ramm via ntg-context; +Cc: Pablo Rodriguez

On 5/24/22 19:58, Henning Hraban Ramm via ntg-context wrote:
> Am 24.05.22 um 18:43 schrieb Pablo Rodriguez via ntg-context:
>> But what I experienced in Acrobat Reader DC (on a borrowed computer) is
>> that you get the standard image (only when field is enabled) when you
>> click elsewhere in the document.
>>
>> I guess that this may be related to a missing implementation, but first
>> I would like to confirm you are experiencing the same.
>
> Custom checkboxes and radiobuttons used to work many years ago, but
> they’re broken for years – Hans blames Adobe for that.

Many thanks for your reply and your extensive testing, Hraban.

[Sorry for the late reply, but I have to do this on my free time.]

I have the impression that this issue might be more complex than Acrobat
misbehaving (in my opinion).

/Annot /Widget may be missing /MK /CA which contains this description
(https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#nameddest=G11.2096745):

  The widget annotation’s normal caption, which shall be displayed when
  it is not interacting with the user.

But since this value is a text string, I wonder whether its value may be
/T from the parent (/FT /Btn).

Again, I don’t really know what is going on here.

But adding the /T from parent, by manually editing it:

  /MK << /CA <FEFF0063006800650063006B002D0033> >>

This makes the mark different and permanent in Acrobat (although I don’t
get the right image). You may click on other area and the check mark
doesn’t vanish.

Maybe the issue is that check boxes don’t work exactly the way the rest
of us might have expected.

Sorry, but I’m again in a hurry.

Many thanks for your help,

Pablo
___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2022-05-25 17:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 11:11 Issue with interactive checkboxes Jan-Erik Hägglöf via ntg-context
2022-05-23 19:59 ` Pablo Rodriguez via ntg-context
2022-05-24  5:44   ` Jan-Erik Hägglöf via ntg-context
2022-05-24  6:08     ` Jan-Erik Hägglöf via ntg-context
2022-05-24  8:18       ` Issue with interactive checkboxes[solved] Jan-Erik Hägglöf via ntg-context
2022-05-24 16:43         ` Pablo Rodriguez via ntg-context
2022-05-24 17:58           ` Henning Hraban Ramm via ntg-context
2022-05-25 17:52             ` Pablo Rodriguez via ntg-context
2022-05-24 21:08         ` Jan-Erik Hägglöf via ntg-context

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).