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

    I have hooked up the eform snippet to take some front-end form fields, and create a document with content based on what was entered into the form. I then use Ditto to list the documents. The problem is that the document is not published immediately, but instead I have to wait until another form is submitted and another document created before the previous one is published. Is there some way to have the document publish automatically?

    The Docmanager documentation I have been following is here: http://modxcms.com/Docmanager-881.html

    I see from this documentation that I can set the doc to be published using
    $doc->Set('published', '1');


    but it doesn’t seem to make a difference.

    The call to Ditto that I am using is:
    [!Ditto? &startID=`63` &summarize=`5` &total=`20` &tpl=`BlogTemplate`!]
    


    and 63 is the parent_id that I am giving to the new documents with
    $doc->Set('parent',$fields['parent_id']);


    I would really appreciate any help, my brain is melting, and my eyes are red...

    Thanks in advance
    Subd
      • 7231
      • 4,205 Posts
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 28779
        • 25 Posts
        Hi dev_cw

        Thanks so much for your help. I thought it might have been the cache, and had added
        $doc->Set('cacheable', '0)
        but it still didn’t show the pages immediately.

        Thanks again, BIG BIG help for me!