Jump to content

Calendar Event help


Genestoy

Recommended Posts

Posted

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>

 

Posted

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

Posted

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>

 

Posted

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 :unsure: , 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...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...