Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow arbitrary ON values for CheckBoxes #4230

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Allow arbitrary ON values for CheckBoxes #4230

merged 1 commit into from
Jan 15, 2025

Conversation

JorjMcKie
Copy link
Collaborator

We previously insisted on that the ON-values for CheckBoxes are defined as "Yes" in the PDF (the published recommended value).

This fix removes this restriction and supports arbitrary ON values.

So a check box can be turned OFF if setting its field value to False or "Off".
It can be turned ON if the field value is set to any of True, "Yes" or the respective value coded in the PDF.

When checking a check box value, the return values always are either "Off" or the ON-value in the PDF. Which value represents ON, can be checked via method Widget.on_state().

We previously insisted that the ON-values for CheckBoxes are defined as "Yes" in the PDF (the published recommended value).

This fix introduces lifts this restriction and supports arbitrary values as ON for  check boxes.

So a check box turns to OFF if setting its field value to `False` or "Off".
It is set to ON if the field value is set to any of 'True`, "Yes" or the respective value coded in the PDF.

When checking a check box's value, the return values invariably are either "Off" or the ON-value in the PDF. Which value this is, can be checked via method `on_state()`.
@JorjMcKie JorjMcKie merged commit 57d1d63 into main Jan 15, 2025
2 checks passed
@JorjMcKie JorjMcKie deleted the address-4055 branch January 15, 2025 16:06
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants