built in print function

Forums Classic DFFS built in print function

Viewing 2 reply threads
  • Author
    Posts
    • #36541
      Phil Grant
      Participant

      Hi,
      I’m using the built in print function that lets me print the selected tab and I’ve got it looking OK by including some common fields in the header like ID’s etc.

      Is it possible to include the name of the current tab in the header HTML so I can identify the setion being printed.

      Thanks,
      Phil

    • #36543
      Alexander Bautz
      Keymaster

      You can do that with some custom js.

      Add this to your custom js (in the form you are printing):

      var selectedTabName = "";
      setTimeout(function(){
          selectedTabName = jQuery(".tabSelected").text();
          jQuery(".tabBase").on("click", function(){
              selectedTabName = jQuery(".tabSelected").text();
          });
      },1000);
      
      

      and this to the Print header field:

      Current tab name: {var:selectedTabName}
      

      Alexander

    • #36545
      Phil Grant
      Participant

      Fantastic and thanks for the quick response

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