Salir
  • Comunidad global
    • Idioma:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티

Can you change the symbol in a checkbox on click?

Nuevo aquí ,
Aug 02, 2021 Aug 02, 2021

I would like to create a form that has checkboxes that when clicked once are an X and when clicked twice are a checkmark. Is this possible or do I need multiple checkboxes, one for x's and one for checkmarks? 

TEMAS
Crear archivos PDF , Procedimiento , Formularios PDF
5.6K
Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Aug 02, 2021 Aug 02, 2021

You can loop through checkbox style on click but not sure how you imagined clicking twice?

You can read here how checkbox style is changed and you can adapt code to use on click in checkbox:

https://community.adobe.com/t5/acrobat/changing-check-box-style-for-entire-document/m-p/12082784 

 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Nuevo aquí ,
Aug 02, 2021 Aug 02, 2021

Hi Nesa,

 

Thanks for your response. What I'm hoping is that the client is able to click the box and as you said, loop through two different checkmark options. For example, click once, it's a checkmark. Click again, it's an X. Click again, it's blank. Click again, it's a checkmark, etc. etc. 

 

Does that make sense? Is your proposed solution still accurate for this situation? 

 

Thanks for your help!

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Aug 02, 2021 Aug 02, 2021

EDIT: I just saw post by bebarth, I belive he answered your question.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Aug 02, 2021 Aug 02, 2021

Here is an example with a 3-option check box.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Aug 02, 2021 Aug 02, 2021

While the checkbox does loop through the different styles, the value of the checkbox is the same for both cross and check, so it's not a true 3-state check. This technique is also potentially problematic in Reader, since changing the style officially requires form rights. You'll need to use a variation or a different technique if you will need the 3-State value.

Also keep in mind that this type of scripting will only work in a few of the better PDF viewers.     

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Aug 04, 2021 Aug 04, 2021
MÁS RECIENTES

You are right, this example was a 3-option and not a 3-state check box. It was an example I did a few years ago for somebody who didn't need export values. But that doesn't mean it is not possible. Attached is an other example with multi-state check boxes. There are several ways to do that in accordance with what we need at the end.

You are right about the JavaScript and pdf viewers too, but if we only have to write for what is understood by all viewers, we won't write very much anymore.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines