We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34178
    • 212 Posts
    To transfer a variable (in our case called $size) from a prehook to a placeholder of the 'email'-hook we added in the prehook:

    $hook->setValue('size',$size)


    an beside this we added in the form
    <input name="size" type="hidden" value="[[!+fi.id_size]]" />

    This technique works but is this the recommend way to transfer data from the prehook to placeholders of the email-snippet?

    We also tried to just set a placeholder in the prehook but this didn´t work:

    $modx->setPlaceholder("size", $size)


    This technique didn´t transfer the value into the email, but only the word
    "[[+size]]"


    Does anybody know how to transfer datas correctly from prehooks to the chunk of the email-snippet?

    (we use Revo 2.1.3pl and formit 2.0.2 pl)

    Thanks a lot!

    Letti
      • 34178
      • 212 Posts
      Does nobody have an idea how to correctly transfer variables or values from a prehook or a hook-snippet to placeholders of the 'email'-hook?