By mrad on Monday, 05 October 2020
Replies 2
Likes 0
Views 625
Votes 0
Hi!

I would have a question about the initial state of an event when it is created.
Right now I have a custom layout in the event edit view where the user can set the state variable (e.g., visible, hidden, trashed).
I don't want to show this field in my template. When I remove it from the custom layout, it's gone from the edit view as expected, however, when saving the event, it does not show up in the calendar. So, I assume that the event status is set to invisible in the case when the field is removed from the template. How can I set the default state of newly created events to visible (when the state field is removed from the custom layout in the edit view)?

Thanks in advance,
Markus
Hello Markus,

So if you include this field again, but use CSS to hide it it will use the default state. If you need to change the default state you would need a little bit of javascript to auto-change it on creating a new event.

Many thanks
Tony
·
4 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks, hiding it with CSS did the trick. Perhaps setting the default state could become a configuration option in the backend in a future version.
·
4 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post