Copy link to clipboard
Copied
I'm creating an interactive bingo card PDF for a client where the user clicks on the boxes to mark an X and mark five boxes in a row to 'win'. All the boxes are buttons with Xs on top all as buttons, but hidden until triggered. Clicking the box sets the visibility of the X on top to show. The problem is that when the next box is clicked the first X disappears, so only one X can be shown at once. In the visibility properties for the boxes, 'show' is only set for the corresponding X on top - all other buttons are set to 'ignore', but they aren't being ignored and hidden instead - why?
Here is the PDF - https://markharrington.design/wp-content/uploads/2020/05/bingo-card-forum.pdf - will need to be downloaded and opened with Acrobat.
Sometimes after clicking lots of random boxes, some of the X's stay visible for no explicable reason. If it's a problem with the layer order, what's the point of the 'ignore' markers. This is driving me mad, any help would be greatly appreciated!
Javascript for showing/hiding fields:
// Show
this.getField("FieldName").display = display.visible;
// Hide
this.getField("FieldName").display = display.hidden;
Copy link to clipboard
Copied
I'm creating an interactive bingo card PDF for a client where the user clicks on the boxes to mark an X and mark five boxes in a row to 'win'. All the boxes are buttons with Xs on top all as buttons, but hidden until triggered. Clicking the box sets the visibility of the X on top to show. The problem is that when the next box is clicked the first X disappears, so only one X can be shown at once. In the visibility properties for the boxes, 'show' is only set for the corresponding X on top - all other buttons are set to 'ignore', but they aren't being ignored and hidden instead - why?
Here is the PDF - https://markharrington.design/wp-content/uploads/2020/05/bingo-card-forum.pdf - will need to be downloaded and opened with Acrobat.
Sometimes after clicking lots of random boxes, some of the X's stay visible for no explicable reason. If it's a problem with the layer order, what's the point of the 'ignore' markers. This is driving me mad, any help would be greatly appreciated!
Javascript for showing/hiding fields:
// Show
this.getField("FieldName").display = display.visible;
// Hide
this.getField("FieldName").display = display.hidden;
Copy link to clipboard
Copied
That's just the way it is. Once you put enough of those things into a PDF it just stops working. This is not now and has never been an InDesign issue.
Copy link to clipboard
Copied
So this is a PDF/acrobat issue and there is no way to fix it?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I agree, unfortunately for me the client wants a PDF. What better alternatives can you recommend?
Copy link to clipboard
Copied
There is a way with a button and a javascript to have the appearance toggle on and off. I have sent you a file to examine
Copy link to clipboard
Copied
Here is the link to example of button and javascript
Copy link to clipboard
Copied
Brilliant thank you!! This will do the job 🙂 What if I wanted to replace the text 'X' with an image/vector (hand drawn style X) - I assume that can be done by replacing "buttonSetCaption"?
Copy link to clipboard
Copied
Currently, the X is defined in the appearance properties: font, size, and text color. You can change to another font. If you want to change to a specific vector shape, the script would need adjusted. I think if the vector was made into a stamp, this could work instead of a text character.
Copy link to clipboard
Copied
You can bring a graphic into Acrobat as a button "field".
Copy link to clipboard
Copied
That's brilliant thank you! I've got it all sorted now, by using an X stamp from another font. Out of interest is there a way to make the icon visible/hidden, like with the caption?
Copy link to clipboard
Copied
Javascript for showing/hiding fields:
// Show
this.getField("FieldName").display = display.visible;
// Hide
this.getField("FieldName").display = display.hidden;
Copy link to clipboard
Copied
That's brilliant thank you!