We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6910
    • 1 Posts
    When a preHook is called and you use it to set a value i.e

    <?php
    $hook->setValue('name','John Doe');


    Now within the form, how should the ’name’ item appear?
    [[!+fi.name]] ?
    [[!+name]]
      • 28215
      • 4,149 Posts
      [[!+fi.name]]
      


      if you havent overridden the &placeholderPrefix property. [ed. note: splittingred last edited this post 11 years, 10 months ago.]
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 6910
        • 1 Posts
        cheers.... realize the error in my ways - as i was using my own stripped down version of formit and i had the prehook part commented out... :’(
          • 36565
          • 73 Posts
          I'm having the OP's question.

          In splittingred's answer, I see only 1 line of text - has some other text, above the 1 line, been lost? If not, I do not fully understand the answer. If yes, could you supply the rest of your original answer, please?
            PHP illiterate MODx enthusiast
            • 3749
            • 24,544 Posts
            No, that's the whole answer. The OP wanted to know what the placeholder would be for a value set in a preHook using the code in his post. Splittingred's one-liner is the answer.



            ------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using.
            MODX info for everyone: http://bobsguides.com/modx.html
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting