I have a custom content type that I want to hook up with start and end dates. But I want more control over how the form and dates are rendered on the node page. If I set "Show in event calendar" to "never" for my custom content type, can I use the API to display the form? I can manually render the dates in my template.

Thanks

Comments

killes@www.drop.org’s picture

I doubt that will work.

What kind of layout do you want for the date selectors?

stodge’s picture

I'm not sure - I would prefer an API so I can control the rendering of the widgets on the form and the data when viewing my node. The idea of "one size fits all" is great but I'm the exception. :)

killes@www.drop.org’s picture

I think you probably want to use the date module. It has the flexibility that event does deliberately not offer.

stodge’s picture

One thing I want to do is programmatically set whether an event for a given content type has times or an end date. Rather than force the user to make extra mouse clicks. So, I have a content type "Milestone" that doesn't require and end date or time. I want my module to disable the end date and times instead of expecting the user to do it.

Thanks

killes@www.drop.org’s picture

You can do this through hook_form_alter, I think.

stodge’s picture

Ah good point. Thanks.

killes@www.drop.org’s picture

Can we mark this fixed, then?

japerry’s picture

Status: Active » Closed (outdated)

Event for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.