IMPORTANT UPDATE: Please DOWNLOAD and update the Formidable PRO2PDF to the Latest Version!

Removal of Unfilled pages?

Home Forums How to Removal of Unfilled pages?

Tagged: ,

  • This topic is empty.
Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #5773 Reply
    Barb
    Guest

    Hi There, Love your product. I have a form where there is one page of questions, followed by 2 pages where the user may add photos. In the event that the user does not upload any images, it would be great if FPRO2PDF could remove those 2 pages when the PDF form is generated, so that the output doesn’t contain 2 pages with nothing entered.

    In my particular scenario, I’ve got 2 versions of a form built in formidable – for example “Form” and another one called “Form with images” – In order to accomplish what I need. When it comes to updating/mapping the forms, it’s a bit of a nightmare as I have to modify both PDFs, and both Formidable PRO2PDF mappings. This scenario will occur across all of my forms, and in some cases, I’ve even got 6 versions going of a form just to support the pages I want to generate on the pdf output.

    Is something like this possible? or possible to be considered in future versions of your product?
    Thanks!
    B.

    #5782 Reply
    admin
    Keymaster

    We understand your need to change the PDF page output based on the form’s submit data, we too had the same need.

    While the plugin will not change the structure of the PDF, and there are no intentions to add any PDF structure changing ability to the plugin, you can make the LayoutID variable and dynamic based on the form’s data, which allows you to have multiple Field Map Layouts from one Formidable Form to many PDF forms.

    For your particular scenario we would:
    . Create a master PDF Form (Form-with-images.pdf) which includes all possible fields.
    . Map the master PDF to the Formidable Form (Form with images).
    . Edit the master PDF Form to remove image page(s) and SaveAs Form-without-images.pdf
    . Create a Duplicate of the “Form-with-images” field map layout by selecting the layout, then click Duplicate at the bottom of the map.
    . Upload the new “Form-without-images.pdf” to the Field Map Designer and save it to the new layout.
    . Delete the unneeded fields from the new layout.

    Now, you’ll need to make the LayoutID dynamic…
    Use the Formidable Shortcode Conditionals such as IF STATEMENTS directly in your shortcode, or to decide which shortcode to use or not to use…

    Please let us know if you need more help with this issue as we remain at your service.

    Here are a couple of forum discussions about ways of making the shortcode dynamic…
    http://www.formidablepro2pdf.com/support/subject/2-questions-images-hiding-fields/
    http://www.formidablepro2pdf.com/support/subject/the-use-of-more-than-one-pdf-in-one-form-problems-with-the-download-link/

    #5795 Reply
    Bizarrb
    Participant

    Thanks! I’ll try to wrap my head around this – Am glad to hear that it’s possible!

    Thanks so much!
    B.

    #6155 Reply
    Bizarrb
    Participant

    Hi Team, One question about this before I try to conquer it. My formidable forms generate the PDF and send the PDF over email once submitted. If I make the LayoutIDs Dynamic, will it work when the forms are emailed?

    #6156 Reply
    admin
    Keymaster

    The send email attachment is controlled by the Layout. So if LayoutID=10 then the email notification(s) for Layout ID10 will be sent.

    Let us know if this does not answer accurately your question, as we remain at your service.

    #6157 Reply
    admin
    Keymaster

    The send email attachment is controlled by the Layout. So if LayoutID=10 then the email notification(s) for Layout ID10 will be sent.

    Let us know if this does not answer accurately your question, as we remain at your service.

    #6158 Reply
    Bizarrb
    Participant

    Perfect, I’ll give it a try. Thanks!

    #6190 Reply
    Barb
    Guest

    ok…I’m already stuck. I’m sure getting the layout IDs to be dynamic will be easy once I get going 🙁 – This may seem like a silly question, but where do I enter the shortcodes that dictate with layoutID the fields should be associated with?

    Lots of fields are associated with more than one layoutID, so I’ll need to be able to tell the shortcode that say “Name” is associated with Layout ID 1, 2, and 3, but Images are only associated with layout 3….If they fill in their name and add an image, then the PDF associated with layoutID 3 is the one that needs to be emailed, but if they only filled out their name, and didn’t add an image, then PDF associated with Layout ID one has to be sent. I’m probably overexplaining….

    Thanks for your patience with me!!
    Barb.

    #6191 Reply
    admin
    Keymaster

    To do this without adding javascript there will need to be form conditions that can be filtered using Fomidable’s Conditionals.

    Then, you can use them to decide which Shortcode to use, or just which value to use for the LayoutID like this:

    [if [123] like=’something’][formidable-download form='w5335k' dataset='567' layout='10'][/if 123][if [123] like=’somethingELSE’][formidable-download form='w5335k' dataset='567' layout='11'][/if 123]

    or you can do this…

    [formidable-download form=’w5335k’ dataset=’567′ layout=[if [123] like=’something’]’10′[/if 123][if [123] like=’somethingELSE’]’11′[/if 123]]

    #6192 Reply
    admin
    Keymaster

    You can use the conditional shortcodes in the On Submit Message Box or in the body of the email message. (or other forms, veiws, pages, post, or custom taxonomy)

    #6196 Reply
    Barb
    Guest

    Thanks so much. So I’m trying to work with this to combine the conditions. When submitted, whichever condition is met, it will use the corresponding layout… I’ve got 4 conditions…I’m trying to get the short to code to say what I’ve described below here…I’m really sorry to ask for more help. To be honest I haven’t used shortcodes before. 🙁 Can you help me put my first one together then I can use the example on my other forms. Or am I asking a code question that is not supported?

    IF both (3065) AND (3352) are not null, use [formidable-download form="pz0rms" layout="29"]
    IF (3065) is not null AND (3352) is null, use [formidable-download form="pz0rms" layout="31"]
    IF both (3065) AND (3352) are null, use [formidable-download form="pz0rms" layout="32"]
    IF (3065) is null AND (3352) is not null, use [formidable-download form="pz0rms" layout="33"]

    #6201 Reply
    Barb
    Guest

    Update: This what I tried to do…The ‘On Submit’ field for my form has the below..I took a shot at it, but I’ve got it wrong. When I get the PDF attachment over email, on the first try the PDF I receive can’t be opened because I receive a message it is damaged. On the second attempt without any changes, I can open the PDF, but it is the 3-page version, when I only filled fields that should appear on the 1-page version.

    This is my on submit content:

    Your report has been successfully completed and submitted.

    [if 3065 not_equal=””][/if 3065] [if 3352 not_equal=””][/if 3352][formidable-download form='pz0rms' layout='29']
    [if 3065 not_equal=””][/if 3065] [if 3352 equals=””][/if 3352][formidable-download form="pz0rms" layout="31"]
    [if 3065 equals=””][/if 3065] [if 3352 equals=””][/if 3352][formidable-download form="pz0rms" layout="32"]
    [if 3065 equals=””][/if 3065] [if 3352 not_equal=””][/if 3352][formidable-download form="pz0rms" layout="33"]

    #6205 Reply
    admin
    Keymaster

    Dynamic LayoutID’s will only work in shortcodes, and shortcodes do not affect email attachments. Attachments are generated upon submission of the form for ALL layouts associated with the form.

    Currently the only way to turn on/off email attachments is from the Field Map Layout screen.

    Last I checked Formidable conditionals may not be stacked, you may require some javascript to make this work as needed, or there may be a way to add a double IF statement, I’ll check with Formidable regarding this.

    Can we take a look at your install to see if any other suggestions can be offered? If yes, please complete this form.

    #6214 Reply
    admin
    Keymaster

    Found the Formidable post that will help. You’ll need to create a shortcode or two that checks all of the values and returns true/false or returns the content if the statement is true. This is just an example, your code will need to be different.

    Compare two fields in View
    Use this shortcode to compare two fields in your View. Usage: [compare val1=”[x]” type=”==” val2=”[y]”]content here[/compare]. Replace x and y with your field ids and replace == with your condition. If you would like to check if the two values are equal, use ==.

    add_shortcode('compare', 'compare_func');
    function compare_func($atts, $content=""){
    extract(shortcode_atts(array('val1' => '', 'val2' => '', 'type' => '=='), $atts));
    if ( !FrmFieldsHelper::value_meets_condition($val1, $type, $val2) ) {
    $content = '';
    }
    return $content;
    }

    #6438 Reply
    Barb
    Guest

    Hi Team, I am still struggling with this. 🙁

    I have simplified my form so that now there is a dropdown menu at the beginning of the form where the user can select one of 4 options:
    • Single Page
    • Single Page + Images
    • Two Pages
    • Two Pages + Images

    Depending on what they select here, when they click submit, the PDF attached to the email notification will be the corresponding PDF document. I’ve tried adding a shortcode to the On Submit message, but seem to be getting unexpected results, for example one of my submissions contained 2 PDF attachments. Am hoping someone at your end could assist me. I’ve filled out the support request form to see there’s anything you can see I’m doing wrong.

    Thanks again for any help you can provide.
    Barb.

    #6458 Reply
    admin
    Keymaster

    The shortcode is failing because you left out the dataset=[id] part.

    Also, the shortcode could be less complicated by changing the values of the dropdown list to the layoutID’s, then just make the layoutID equal the form field ID, like this…
    [formidable-download form=’44tmf035′ dataset=[id] layout=[5346]]

    However regarding email attachments, they are not controlled by the shortcode, they are sent based on the Layout settings. There is currently no way to stop attachments using shortcodes.

    You can, however, place the shortcode in the email body, you’ll be able to click to download the correct PDF.

    Let me know if you want me to change the dropdown field values and shortcode for you, as we remain at your service.

    #6460 Reply
    Barb
    Guest

    Ok, Thanks so much for the help – My need is to have only one attachment in the email, and it be the correct number of pages. 🙂 The user fills these forms from his android phone so can’t fiddle with downloading the correct one to his phone, then attach it to a new email. 🙁 All good, I can work with my current scenario.

    Thanks again for all the assistance with this!
    B.

Viewing 17 posts - 1 through 17 (of 17 total)
Reply To: Reply #6190 in Removal of Unfilled pages?
Your information: