Monday, 05 October 2020
  2 Replies
  627 Visits
0
Votes
Undo
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
4 years ago
·
#218628
Accepted Answer
0
Votes
Undo
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

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

4 years ago
·
#218628
Accepted Answer
0
Votes
Undo
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

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

4 years ago
·
#218632
0
Votes
Undo
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.
  • Page :
  • 1
There are no replies made for this post yet.