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


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)Displaying Display Text for option in cusom field
Pages: [1]   Go Down
Print
Author Topic: Displaying Display Text for option in cusom field  (Read 268 times)
0 Members and 1 Guest are viewing this topic.
jbadler
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: September 04, 2003, 06:54:00 PM »

For my calendar, I have a custom event field called "category".  I have several options for this category, each of which has a value and display text.  For example, "junchoir" for value and "Junior Choir" for display text.  I have the following line in my template:

<% FOREACH EVENT %><%= EVENT FIELD(category) %><% /FOREACH %>

This returns the value "junchoir", but I want the template to return the display text "Junior Choir".  How do I go about doing this?  I want to avoid simply changing the value to match the display text, because I don't want to run into problems with having spaces, etc in my SSI calls.

Thanks!

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #1 on: September 04, 2003, 08:22:00 PM »

** "junchoir" for value and "Junior Choir" for display text. **

Why not have them both "Junior Choir"?

Dan O.

------------------

Logged
jbadler
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: September 04, 2003, 08:31:00 PM »

"I want to avoid simply changing the value to match the display text, because I don't want to run into problems with having spaces, etc in my SSI calls."

Granted, I know that's probably a little paranoid, and it will probably work fine, I just wanted to see if there was a simple solution I was missing.

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #3 on: September 05, 2003, 12:32:00 PM »

The name/value pairs for select fields are stored in a separate database. You would need to open that other record each and every time such a value needed to be displayed. That would likely increase the server overhead when using the calendar.

If you really want to do it that way, you could look through the HTML.pm file located in the calendarscript/lib directory to see how it is done there to get an idea what would be needed to do something similar in the calendar display.

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: