Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is there a way to have a checkbox without a blank state

Community Beginner ,
Oct 11, 2024 Oct 11, 2024

I have a three 3 way checkbox with blank, cross and tick.

Is there a way of omitting the blank state?

TOPICS
PDF , PDF forms
476
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 11, 2024 Oct 11, 2024

?  Please clarify further.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 11, 2024 Oct 11, 2024

When I click on my checkbox it cycles through 3 states

Blank, Cross, Tick

I would like to have cross and tick only.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 11, 2024 Oct 11, 2024

I'm sorry.  I still don't know what you mean.  A check box?  Is the "state" the Check Box Style in the options tab of the properties?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 11, 2024 Oct 11, 2024

If so, enter the following script as a mouse up action in the check box:

if(event.target.style=="cross")
{
event.target.style="check";
event.target.value="Yes";
}
else
{
event.target.style="cross";
event.target.value="Yes";
}

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 14, 2024 Oct 14, 2024
LATEST

Thank you, this works exactly the way I wanted.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 11, 2024 Oct 11, 2024

You can have a 'tri-state' button, as 'Mouse UP' action of a button use this:

if (event.target.buttonGetCaption() == "") {
 event.target.buttonSetCaption("\u2714");}
else if (event.target.buttonGetCaption()=="\u2714") {
 event.target.buttonSetCaption("\u2716");} 
else if (event.target.buttonGetCaption()=="\u2716") {
 event.target.buttonSetCaption("\u25C7");} 
else if (event.target.buttonGetCaption()=="\u25C7") {
 event.target.buttonSetCaption("\u2714");}

Replace unicode symbols codes with your desired ones.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines