Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook Tuesday at 01:29 PM
Genestoy Posted October 1, 2017 Share Posted October 1, 2017 By default the "Single Day Event" is checked and I need the "All Day Event" checked by default instead in the code below in the datesForm template. I have tried several code change scenarios but nothing seems to work? Thanks for any assistance <ul class='ipsList_inline'> <li> <span class='ipsCustomInput'> <input type="checkbox" role="checkbox" name="event_dates[single_day]" {{if isset($value['single_day']) AND $value['single_day']}}checked aria-checked='true'{{endif}} value="1" id="check_single_day"> <span></span> </span> <label for='check_single_day'>{lang="event_single_day"}</label> </li> <li> <span class='ipsCustomInput'> <input type="checkbox" role="checkbox" name="event_dates[all_day]" {{if isset($value['all_day']) AND $value['all_day']}}checked aria-checked='true'{{endif}} value="1" id="check_all_day"> <span></span> </span> <label for='check_all_day'>{lang="event_all_day"}</label> </li> </ul> Link to comment Share on other sites More sharing options...
AndyF Posted October 1, 2017 Share Posted October 1, 2017 Untested but for the one you want: <input type="checkbox" checked="checked" Then follow on with the rest of it. Basically add the checked="checked" part straight after the input type Link to comment Share on other sites More sharing options...
Genestoy Posted October 1, 2017 Author Share Posted October 1, 2017 Thanks Andy but that didn't work for me, I did some more playing around and the code below seems to work fine (unless somebody sees a problem with it). I only wanted the "All Day Event" to show. I commented out the single day code and then changed the "all_day" values (2) from "all_day" to "single_day" in the all day code and it worked. <ul class='ipsList_inline'> <!--<li> <span class='ipsCustomInput'> <input type="checkbox" role="checkbox" name="event_dates[single_day]" {{if isset($value['single_day']) AND $value['single_day']}}checked aria-checked='true'{{endif}} value="1" id="check_single_day"> <span></span> </span> <label for='check_single_day'>{lang="event_single_day"}</label> </li>--> <li> <span class='ipsCustomInput'> <input type="checkbox" role="checkbox" name="event_dates[all_day]" {{if isset($value['single_day']) AND $value['single_day']}}checked aria-checked='true'{{endif}} value="1" id="check_all_day"> <span></span> </span> <label for='check_all_day'>{lang="event_all_day"}</label> </li> </ul> </div> Link to comment Share on other sites More sharing options...
AndyF Posted October 1, 2017 Share Posted October 1, 2017 No problem. I do think a plugin possibly would be the best option for this although that might be a bit too much of an ask , I do not see anything immediately wrong from 'reading' the code you have posted above however but bear in mind I'm no skinner/designer... Link to comment Share on other sites More sharing options...
Genestoy Posted October 1, 2017 Author Share Posted October 1, 2017 Thanks again Andy, always good to hear from you! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.