Thread Starter
zealzy
(@zealzy)
Sorry I asked the wrong question. I have named multiple fields the same classname, but when i do the print function he only picks 1. What code or what class names do i need to use?
Hello @zealzy
You should call the printForm operation passing as a parameter, the selector for the field that contains all the fields to print.
For example, assuming you have Div field with the class: for-printing and the fields to print are in it, the code to run would be: printForm('.for-printing')
Another alternative would be print the form but hiding the rest of the fields.
In this case, insert an “HTML Content” field in the form with the piece of code:
<style>
@media print only{
#fbuilder .fields:not(.my-field2){display:none;}
}
</style>
The onclick event of the button would be: printForm(this.form);
Best regards.Hello @zealzy
You should call the printForm operation passing as a parameter, the selector for the field that contains all the fields to print.
For example, assuming you have Div field with the class: for-printing and the fields to print are in it, the code to run would be: printForm('.for-printing')
Another alternative would be print the form but hiding the rest of the fields.
In this case, insert an “HTML Content” field in the form with the piece of code:
<style>
@media print only{
#fbuilder .fields:not(.my-field2){display:none;}
}
</style>
The onclick event of the button would be: printForm(this.form);
Best regards.
Thread Starter
zealzy
(@zealzy)
I do understand, but what if i want to print multiple classes. I can’t use this code:
printForm(‘.for-printing,.for-printing1’); How do I do it
Hello @zealzy
In this case, I recommend you to assign a second class name to the fields you want to print at once and call the printForm operation passing as the parameter the new class.
Note, if you need to assign multiple class names to the same field, separated them by a blank character through the “Add CSS Layout Keywords”
Best regards.