We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2896
    • 70 Posts
    HI,

    this is probably very easy but I can’t seem to find it ...

    I want to include the [*pagetitle*] in my report, but this doesn’t seem to work

    How can i do this?
    thx!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Since the report is generated by eForm there are two ways you could deal with this. I think the easiest would be to create a hidden field in your eform, with its value [*pagetitle*], then include the [+hiddentitle+] placeholder in your report template.

      The other way would involve making a custom function to add the $modx->documentObject[’pagetitle’] to the &$fields array.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 2896
        • 70 Posts
        Great, first technique worked. Thanks!

        Only, i didn’t make it hidden, since there was this tampering error (see other post in this forum). Visibility is no problem, i made the field readonly

        greetings and thank you sottwell
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          You could also use CSS - style="display:none;" - to hide it altogether from the viewer.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org