PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Is it possible to have my form event date = post date published

  1. I have created a form that creates a post for upcoming events. Everything seems to be working pretty good except for a couple things. When I fill the form out for an upcoming date and submit, the post shows that it is for todays date. Can my event form not also change the date on the pending post for this upcoming date? (here is a link for a screenshot of my event form below)

    http://awesomescreenshot.com/03a8drcdb

    Also, I was wondering if the additional form fields that I have added can be included in the newly
    created post. At the moment the there are many items not included in the post.
    (screenshot below of the post that is generated from the form)

    http://awesomescreenshot.com/0f28drl9b

    I would really like it to come out like this post that I manually entered.
    (screenshot below)

    http://awesomescreenshot.com/0b38drr1e

    Any feedback would be appreciated.

    Thanks!

    Posted 13 years ago on Tuesday June 19, 2012 | Permalink
  2. David Peralty

    Changing the post date can be difficult, but for the rest, you will want to use custom fields and then display the custom fields on your theme. Custom fields can be used to store/manage all kinds of data. Research WordPress custom fields and see if it is what you want to display the rest of the data. Or else, you would be writing a PHP hook to take multiple fields, and merging them into the body content of your post.

    For the date, you would have to write a gform_pre_submission hook to make the date of the WordPress post be the value of what is used in the date field, and then make sure to set the post status to be Future as that's the way WordPress works. Future posts aren't published and as such won't be displayed until the date comes up.

    Posted 13 years ago on Tuesday June 19, 2012 | Permalink