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

Support hidden form fields #730

Merged
merged 4 commits into from
Jan 9, 2021

Conversation

jbeuckm
Copy link
Contributor

@jbeuckm jbeuckm commented Jan 2, 2021

No description provided.

Copy link
Owner

@Hopding Hopding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jbeuckm! This will be a nice addition to the library.

In addition to updating the other field types, would you please update one of the integration tests to add a hidden field? That way this feature doesn't regress down the line.

Also, I'm curious what your use case for a hidden field is, if you don't mind sharing? I've never had occasion to use them myself. Just wondering what purpose they would serve.

@@ -669,6 +669,7 @@ export default class PDFTextField extends PDFField {
borderColor: options.borderColor,
borderWidth: options.borderWidth ?? 0,
rotate: options.rotate ?? degrees(0),
hidden: options.hidden,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please add this to all the different field types? (PDFButton, PDFCheckBox, PDFDropdown, PDFForm, PDFOptionList, PDFRadioGroup, PDFTextField)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbeuckm
Copy link
Contributor Author

jbeuckm commented Jan 3, 2021

Thanks @jbeuckm! This will be a nice addition to the library.

In addition to updating the other field types, would you please update one of the integration tests to add a hidden field? That way this feature doesn't regress down the line.

Also, I'm curious what your use case for a hidden field is, if you don't mind sharing? I've never had occasion to use them myself. Just wondering what purpose they would serve.

Yes - I was just being lazy. I added hidden to the other fields and tested the flag in the TextField spec. See what you think.

I wanted a non-obvious way to mark a PDF so that I could check that it was (probably) the same original file later. I'm interested in hearing other ways to do the same. If there is a clear path to doing this with an encrypted certificate, I might help work on it.

@jbeuckm jbeuckm requested a review from Hopding January 5, 2021 14:40
@Hopding Hopding merged commit cb1a4df into Hopding:master Jan 9, 2021
Hopding added a commit that referenced this pull request Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants