• Resolved Damn!

    (@greedymind)


    Hello,

    I just discovered this plugin when I was searching through the CFF docs about implementing Forms printing feature and boy I must say, this plugin is a life saver. I was quickly able to insert a block and a button to print the form. Just reviewed it with a much deserving 5 stars. ?? However my need is a bit different. Instead on printing 1 form, I would like to print 2 forms (I have 2 forms in the page) one below the other on click of the print button. How do I go about it?

    Thanks.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @greedymind,

    The process is really simple, you should call the “printForm” operation passing a selector that covers both forms. For example, assuming you have inserted the shortcodes of both forms into a same container tag:

    
    <div class="forms-container">
    [CP_CALCULATED_FIELDS id="1"]
    [CP_CALCULATED_FIELDS id="2"]
    </div>
    

    In this case the “printForm” operation should be called as follows:

    printForm('.forms-container');

    and that’s all.
    Best regards.

    Thread Starter Damn!

    (@greedymind)

    Hello,

    The container the forms are in my page is the “entry-content” and I’ve given the fucntion as printForm(".entry-content");

    Doing that prints the forms along with all the content (including the ads) in the page. I’d like to print only the forms excluding all the content. Is it possible?

    Ref page: https://damnripped.com/test/

    Plugin Author codepeople

    (@codepeople)

    Hello @greedymind,

    Simply create your own container with only the forms into it, for example into a couple of DIV tags with an unique class or id assigned. Another solution would require edit the code of the “printForm” operation (it is included in the form into a “HTML Content” field) to remove the tags you don’t want.

    Best regards.

    Thread Starter Damn!

    (@greedymind)

    I just tried enclosing the shortcodes with div containers with same class name ex: class="forms-container"and print it, only the first form prints.

    I guess the correct question would be: How to combiningly print the forms present in 2 seperate containers?

    Plugin Author codepeople

    (@codepeople)

    Hello,

    I’ve checked your webpage and there is no tags with the “forms-container” class.

    Best regards.

    Thread Starter Damn!

    (@greedymind)

    I just changed the classes to ids ex: <div id="forms-container"> and tried to print with printForm("#forms-container");. Still only the first form prints.

    Plugin Author codepeople

    (@codepeople)

    Hello,

    I don’t know if we are visiting the same page (https://damnripped.com/test/), or if there is enabled a cached version of website for non registered users, because I have checked your webpage again, but it does not include any tag with the class name or the id you are referring.

    Best regards.

    Thread Starter Damn!

    (@greedymind)

    Hello,

    The cache was already cleared, but I cleared it once again now. Please see these screenshots of the container:

    https://prntscr.com/hq3zrw

    https://prntscr.com/hq407n

    Plugin Author codepeople

    (@codepeople)

    Hello,

    I’ve checked your webpage again, and you don’t have inserted both shortcodes into the same container, you have inserted each shortcode into its own container. I’m sorry, but you have no followed my instructions, both forms must be into the same container:

    <div class="forms-container">
    [CP_CALCULATED_FIELDS id="1"]
    [CP_CALCULATED_FIELDS id="2"]
    </div>

    Best regards.

    Thread Starter Damn!

    (@greedymind)

    But the issue is, there is some text content inbetween the 2 forms. If I put them in the same container won’t the content will also print along with the forms? or am I missing something?

    Plugin Author codepeople

    (@codepeople)

    Hello,

    In this case you should edit the “printForm” code to remove the tags with the texts before printing, or define the CSS rules in your website for hiding the block of text when the page is printed.

    If you need additional help, I can offer you a custom coding service from my private website:

    https://cff.dwbooster.com/customization

    Best regards.

    Thread Starter Damn!

    (@greedymind)

    Hello,

    I’ve fixed it by enclosing the text content within a div container ex: <div id="noprint"> and using some style tags like below:

    <STYLE>
    @media print{
       #noprint{
           display:none;
       }
    }
    </STYLE>

    Thanks.

    Plugin Author codepeople

    (@codepeople)

    Hello @greedymind,

    Perfect.

    Best regards.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Printing 2 Forms with 1 Button’ is closed to new replies.