Control File Name when using Print

Forums Dynamic Forms for SharePoint Control File Name when using Print

Viewing 3 reply threads
  • Author
    Posts
    • #36058
      Mitchell T
      Participant

      Hello,

      I was wondering if there was any way to control the default name of the file when using the function to print the current tab in dffs display form ?

      Thanks,
      Mitchell

    • #36060
      Alexander Bautz
      Keymaster

      The file name is pulled from the title tag in the HTML page and is not set by any code in DFFS so you can change it by writing a new title to this tag:

      document.getElementsByTagName("title")[0].innerHTML = "Your custom file name";
      

      Alexander

    • #36063
      Mitchell T
      Participant

      So that changed the title when printing from the default browser function. However, I’m trying to change the file name when using the DFFS “Print Active Tab” functionality.

      • #36064
        SteveE
        Participant

        I just tested it and what he provided changes the file name when using the dffs print active tab functionality. Are you sure you are using it properly?

    • #36068
      Alexander Bautz
      Keymaster

      As Steve noted it should work for both (at least in Chrome where I have tested). What name are you getting for the file when printing a tab? – just a random name, or like this: [site title] – [item title]?

      Alexander

Viewing 3 reply threads
  • You must be logged in to reply to this topic.