Skip to main content
Participant
August 28, 2025
Answered

Three-State Button

  • August 28, 2025
  • 3 replies
  • 302 views

Hi there,

I am creating a planner in Acrobat and would like to create a checkbox that has three states:

1st click  =  filled box (hex color: 918B80)

2nd click = Dash, cross, checkmark, whatever is easiest. I just want the hex color: 918B80.

3rd click = Blank (White box)

 

This is the checkmark 'legend' as reference:

 

I've been able to find a forum on how to create a three-state button that does Checkmark, dash, and blank, but I would really like to learn how to implement a color fill. Is this too complicated? Would it create issues for my clients who would be using this planner through a standard pdf reader? Is there software or an app that's better suited for this type of project?

Correct answer Nesa Nurani

To use checkbox as you describe it, go to checkbox option and select which ever style you wish for second click (check, cross...etc) then add this script as Mouse UP action:

var f = event.target;
var grayColor = ["RGB", 0.57, 0.55, 0.50];
var whiteColor = color.white;


if (f.currentState === undefined) f.currentState = 0;

switch (f.currentState) {
 case 0:
  f.fillColor = grayColor;
  f.checkThisBox(0, false);
  f.currentState = 1;
  break;

 case 1:
  f.fillColor = whiteColor;
  f.checkThisBox(0, true);
  f.textColor = grayColor;
  f.currentState = 2;
  break;

 case 2:
  f.fillColor = whiteColor;
  f.checkThisBox(0, false);
  f.currentState = 0;
  break;
}

But to be able to see colors you will have to turn off highlight color in preferences (your users would have to do the same on their computers too).

3 replies

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
September 1, 2025

To use checkbox as you describe it, go to checkbox option and select which ever style you wish for second click (check, cross...etc) then add this script as Mouse UP action:

var f = event.target;
var grayColor = ["RGB", 0.57, 0.55, 0.50];
var whiteColor = color.white;


if (f.currentState === undefined) f.currentState = 0;

switch (f.currentState) {
 case 0:
  f.fillColor = grayColor;
  f.checkThisBox(0, false);
  f.currentState = 1;
  break;

 case 1:
  f.fillColor = whiteColor;
  f.checkThisBox(0, true);
  f.textColor = grayColor;
  f.currentState = 2;
  break;

 case 2:
  f.fillColor = whiteColor;
  f.checkThisBox(0, false);
  f.currentState = 0;
  break;
}

But to be able to see colors you will have to turn off highlight color in preferences (your users would have to do the same on their computers too).

JR Boulay
Community Expert
Community Expert
August 31, 2025

You should therefore refer to the ‘text2’ field, below the ‘button2’ field (the traffic light).

Acrobate du PDF, InDesigner et Photoshopographe
JR Boulay
Community Expert
Community Expert
August 28, 2025

In the attached file, you should pay particular attention to ‘Multistate checkbox’.

 

Acrobate du PDF, InDesigner et Photoshopographe
Participant
August 30, 2025

Thank you for your help, but I already know how to create a multistate check box like what you have shown. I wanted something more refined to match the style of my planner, like what I had already written in my original question. Please refer to my original specifications. Maybe it's too complicated? Someone else mentioned that it will require using images, not just plain text, and is more complicated to implement.