How to control the Name of PDF file attached

  • WSIguy
    Asked on April 10, 2019 at 10:25 PM

    Hi,

    https://www.jotform.me/form/90923694519468 

    We are still building/testing this form.

    Initially, the PDFs that came attached were names with long, random numerical strings. That was fine. Now, the last few have all just been named 1.pdf 

    This (while not a deal killer) seems odd.

    Preferably, we could have better control over the naming, like:
    event-receipt-randomstring.pdf
    so like...
    event-receipt-949494.pdf

    But my main question is getting all docs 1.pdf instead of unique random strings.

    Best,
    Bruce

  • David JotForm Support Manager
    Replied on April 11, 2019 at 12:11 AM

    You will be able to control the file name from the layout settings of the PDF editor:

    1554955866layoutsettings Screenshot 10

    There in the File Name option, you can select any of the fields to build the file name.

  • WSIguy
    Replied on April 11, 2019 at 2:48 AM

    Thanks.
    Is there any guide or info on how to identify form items?
    My 2 docs are pre-set with {q_2}{q_15} as the filename.

    But where do these come from? They don't match Field Name from the form itself.

    Where can I get a list of tokens that can be used?

    Also, in THIS case, I would prefer some set static text + a random identifier.
    For example:
    walkathon-tickets######.pdf

    With ###### as random numbers.

    I would just use the sender's name, but here we are using Japanese characters for the name fields, so that doesn't really work.

    Best,
    Bruce

  • Ashwin JotForm Support
    Replied on April 11, 2019 at 4:13 AM

    It {q_2} is the ID of the questions you have already added in form. As soon as you try to edit the PDF name in PDF editor, it will show a dropdown with a list of all questions and you need to select the desired question which you want to include in PDF file name.

    You can add a static text plus any form field value. It is not possible to generate a random number just for file name. What you can do is add "Unique ID" or "Random Value Generator" widget in form which will be hidden. Then you can select that field in the file name. Please check the screenshot below on how to add static text plus field value:

    1554970285PDFName Screenshot 10

    Hope this helps.

    Do get back to us if you have any questions.

  • WSIguy
    Replied on April 11, 2019 at 4:15 AM

    Awesome, thanks.