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

    I have formit2resource working... almost. My form (http://trails.inov-8.co.nz/add-new.html) creates an unpublished resource, it sends me an email, and it redirects. However, I cannot get the resource to be created where I would like it to be.

    I want it to have the parent id 93. I have tried the following code in my form...
    <input id="parent" name="parent" type="hidden" value="[[~93]]" />
    <input id="parent" name="parent" type="hidden" value="93" />
    <input id="parent" name="parent" type="hidden" value="[[+fi.93]]" />

    none of these create the new resource with the parent of 93, all are at the top level, in the web context (i’d like them to be in the "trails" context, but right now, I can’t get them to appear with ANY parent I define).

    Any ideas?

    Thanks,
    Rachel

    Revo 2.1, just installed today + latest version of Formit
    • Hi Rachel


      try this as example:

      $doc->set(’parent’, ’93’);
      $doc->save();


      where $doc is your assigned modx modResource obj
        modx and ecommerce pro