We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Have I gone nuts?

    The NewsPublisher form from the tutorial puts the following line on the screen:

    "Note: Leaving the Publish Date empty will immediately publish your news entry."

    But there’s no place to enter a Publish Date.

    I desperately need the web user to be able to enter both a Publish and an Unpublish date. Is there a more
    recent version of the form chunk that includes these?

    If not, can someone suggest how to add them to the current form?

    *** Here’s the form from the NewsPublisher tutorial. There appears to be no code at all for handling publication dates:

    div id="blogForm">
    <form name="NewsPublisher" method="post" action="[~[*id*]~]">
    <fieldset>
    <h3>Publishing Details</h3>
    <p>Note: Leaving the Publish Date empty will immediately publish your blog entry.</p>
    <input name="NewsPublisherForm" type="hidden" value="on" />
    <label for="pagetitle">Page title <abbr title="The title used on the browser window">?</abbr>: <input name="pagetitle" id="pagetitle" type="text" size="40" value="[+pagetitle+]" /></label>
    <label for="longtitle">Headline <abbr title="The title used on the article">?</abbr>: <input name="longtitle" id="longtitle" type="text" size="40" value="[+longtitle+]" /></label>
    </fieldset>
    <fieldset>
    <h3>The Content</h3>
    <p>The Summary field is optional, but is used as a short version for RSS feeds and summary views on the main blog page.</p>
    <label for="introtext">Summary (optional, but encouraged):<textarea name="introtext" cols="50" rows="5">[+introtext+]</textarea></label>
    <label for="content">Content:[*blogContent*]</label>
    </fieldset>
    <fieldset>
    <h3>You’re Done</h3>
    <input name="send" type="submit" value="Blog it!" class="button" />
    </fieldset>
    </form>
    </div>


    Bob
      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
      • 3749
      • 24,544 Posts
      I found that although the tutorial involves creating a custom chunk and TV. The NewsPublisher Snippet has a built-in form with publish and unpublish dates built in. It executes if you just put [[NewsPublisher]] in the code with no variables.

      Someone should probably remove the note about publish date in the NewsPublisher tutorial.

      My guess is that the tutorial used to include the publish/unpublish dates but the Javascript calendar didn’t work right (didn’t work for me when I tried pasting the form code into the chunk created in the tutorial) so they were removed them and whoever did it forgot to take out the note.

      Bob
        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