Question: how to supress the rendering of a given HTML element on the PDF that results when a form is submitted?
Scenerio: we have a form that has 2 checkboxes on it - these checkboxes make certain pages on a form visible / not visible.
Form has 3 pages, all need to be rendered together in a single PDF.
However, when the form is submitted, these checkboxes are not relevant to what the client needs and we want to suppress them.
Attempt 1
checkbox 1 no CSS
checkbox 2 no CSS
submit button hides both via javascript
$("#q6").hide();
$("#q7").hide();
result: checkboxes both still render on PDF
Attempt 2
checkbox 1 has 'hidden' CSS class
checkbox 2 has 'hidden' CSS class
form "ready" javascript
$('#q6').removeClass('hidden');
$('#q7').removeClass('hidden');
form "submit" request
$(".action-btn").click(function(){
$("#q6").hide();
$("#q7").hide();
};
Result: checkboxes both still render on PDF
Attempt 3
checkbox 1 has 'hidden' CSS class
checkbox 2 has 'hidden' CSS class
no other CSS / javascript
Result: checkboxes don't render on PDF
but Attempt 3 is not doing what is needed - it was done just to see if ANYTHING would suppress the checkboxes.
So, how does the PDF rendering engine work upon submittal - and what, if anything, can we do to suppress rendering of a given html element on the resulting PDF in the repository?