Hi,
Seems like something basic but can’t get it to work.
How do I set the condition that if the switch is checked.
![]()
I tried:
$_POST.announcement==1
$_POST.announcement==“checked”
$_POST.announcement==true
Hi,
Seems like something basic but can’t get it to work.
How do I set the condition that if the switch is checked.
![]()
I tried:
$_POST.announcement==1
$_POST.announcement==“checked”
$_POST.announcement==true
If a checkbox is checked it will send its value on form submit. So add a value for it, for example 1.
In your server action you just need to check:
{{$_POST.announcement}}
It will be true when the post variable returns a value on form submit, i.e. when checked.
Thank you