Expand my Community achievements bar.

SOLVED

moving checkboxes

Avatar

Level 3

Hi guys

I have a form containing three checkboxes, and I would like to print only those that are checked by the user.

For the checkboxes that are not checked, I would like them removed from the final printout (but still visible to the user),

and I would like the other checkboxes to move over, so there is no space between them.

Any help would be appreciated.

Thank you

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi,

Try wrapping your check boxes inside a flowed subform and write a prePrint script to hide the unchecked boxes and a postPrint script to show them again. Your form will need to be saved as an Adobe Dynamic XML Form.

Cheers

Hélène

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

Hi,

Try wrapping your check boxes inside a flowed subform and write a prePrint script to hide the unchecked boxes and a postPrint script to show them again. Your form will need to be saved as an Adobe Dynamic XML Form.

Cheers

Hélène

Avatar

Level 3

Thank you.

One concern I have is that the user may hit print, and then cancel the print, such that the postPrint event will not be called.

Need I be concerned about this?

Thanks

Avatar

Former Community Member

You may be able to check the xfa.event.cancelAction to see if they cancelled the operation. Just look up cancelAction in the help and it will describe the values to look for.

Paul

Avatar

Former Community Member

I ran a quick test in Acrobat 8.1.5 and 9.1.3 and the postPrint event fires even when the user cancels the print.

Hélène

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----