Question

enter image description here

In the screen shot above, there is a DateTime control field in the Form. Currently users set the values manually and then publish the post.

I want the Published Date to be set automatically and hide the DateTime control from the form.

Was it helpful?

Solution

The steps that @George mentioned is half a way correct. But the problem is if you hide Published column from the content type Post then its value will also hide from list view and post both. You can test this by creating a post in your blog and you will not see the date-time on the post.

There is a trick here to get the date-time on the post without Published field being available to the user.

Create a SPD workflow to publish on Post list. In this workflow simply create one step to update the Published field value with Modified field value as show in below image. Ensure to only select "Start the workflow automatically when an item is created" at the Start Options in SPD.

Now create a post after publishing the workflow and you will see the date-time on your post and even in the list view with Published column being unavailable to the author.

enter image description here

OTHER TIPS

Ahh I see, in response to your comment above then:

Go to the Advanced Settings of this list, set Allow Management of Content Types equal to Yes. Click on the Post content type, click on the Published column, and select Hidden.

The user will no longer have the option to set the published date/time. Note that it will still be set, but will be set the default current time.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top