Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8026 Posts in 1851 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: Customize Add Event template  (Read 662 times)
0 Members and 1 Guest are viewing this topic.
caputo737
New Member
*

Karma: 0
Offline Offline

Posts: 14


« on: October 05, 2007, 01:21:30 PM »

I implemented the 'Different Categories Idea' code listed here: http://www.calendarscript.com/support/forum/index.php/topic,923.0.html

I am also using the highly useful "Add OneClick Event" plugin. 

I would like to modify the "Add OnClick Event" template so it has one of my custom categories hardcoded into it, rather than allowing someone to choose which category the new event will be in.  So, for example, the quickadd page would only allow additions to the "Category1. "

Thanks in advance for any help.

[fixed link]
« Last Edit: October 05, 2007, 09:21:50 PM by DanO » Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 221

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: October 05, 2007, 09:20:04 PM »

That is going to be a bit tricky since the event details form fields are generated by a loop in the code in the schedule_oneclick_non_recurring.html template which starts:

$fieldnames = &main::DBGetAddFields($db);
foreach $field (@$fieldnames) {

You would need to trap the loop looking for your particular field key and then print alternative HTML table code for just that one field's form element. Something similar is described for printing the Event Details in the previous forum message, "Break apart event title and description".

BTW. I believe "$field" is the valve of the event record field key currently being worked upon by the loop. It is likely what any conditional would have to be based upon.

JFYI

Dan O.
Logged
Pages: [1]   Go Up
Print
Jump to: