Skip to content

oCourse.HTMLSourceList ​

Adds the 'How did you hear about this registration?' drop down to the Enrollment Cart, populated with Tracking codes.

ACEweb Routines/Templates ​

XEnrollcard.htm

Required Parameters ​

None

Optional Parameters ​

  1. Character string to set the selection prompt, entered in quotation marks - appears in the top line of the drop-down.

You can also specify a default code (code must exist in the Tracking Code list) in this parameter. If the user makes no Tracking Code selection, the system will assign the specified code.

To use this option, add a colon [:] plus the code to the end of the Prompt, e.g.[How did you learn about this course?:NOCODE].  If no code is specified in this field and the user does not select a code, the Tracking code will be set to WWWEB.

  1. Numeric value specifying tabindex value.
  2. Session - if entered, the drop-down box only shows once in a given session (i.e. once the user picks a tracking selection, the drop-down will not appear when subsequent courses are added).  If parameter 3 is left blank, the drop-down is shown for every course and each tracking code is uniquely saved for all registrations, including proxy registrations.
  3. Alternate HTML Field Name, entered in quotes (defaults to "lstTrackCode", the name expected by the XReg method).
  4. Character return value based on entry in Course is Specific for field:

REG – only include codes set to REG CRSE – only include codes if the current course matches the entry CRSE,REG – include codes matching either of the above conditions ALL – all active codes are included

  1. Sort Order Specification, entered in quotes:

"Source" - sorts by description (default) "IDKey" - sorts by code.

  1. Additional HTML attributes, enclosed in quotation marks or brackets (e.g. [class="required"]).
  2. Radio flag. If set (.T.) choices will be shown as radio buttons rather than in a drop-down list.
  3. Radio button attributes, entered in quotes. HTML attributes applied to the buttons.
  4. Button prefix, in quotes. Text inserted before each radio tag.
  5. Button postfix, in quotes. Text inserted after each radio button label. Add an HTML break tag here to display the buttons in a vertical column
  6. Button to pre-select (numeric value). If set to N, the Nth button will be selected when the page comes up. If omitted or 0, no button will be selected initially.

Examples ​

##oCourse.HTMLSourceList()## returns the tracking code drop down list box with 'How did you hear about this class?' as the selection prompt

##oCourse.HTMLSourceList([How did you hear about this registration?])## returns the tracking code drop down list box with 'How did you hear about this registration?' as the selection prompt

##oCourse.HTMLSourceList([How did you hear about this registration?],,,,[REG])## returns the tracking code drop down list box with 'How did you hear about this registration?' as the selection prompt and only includes codes that have REG in the Course is Specific for field

##oCourse.HTMLSourceList([How did you hear about this registration?:NOCODE])## returns the tracking code drop down list box with 'How did you hear about this registration?' as the selection prompt. If the user does not select a tracking code, the NOCODE tracking code is assigned to the registration

##oCourse.HTMLSourceList([How did you hear about this registration?],1,Session,,,,,.t.)## displays tracking code selections as a radio button list instead of a drop down box

##oCourse.HTMLSourceList([How did you learn about this course?],1,Session,,,,[class="required"])## returns the tracking drop down list box with 'How did you learn about this course?' as the selection prompt, tabindex set to 1, with box only showing once per session, and setting it to be *required (user must select a tracking code)

*To require the tracking code, you must also add these lines to the $('#form1').submit(function():

if ($("#lstTrackCode").val().length == 0)  
{  
$("#lstTrackCode").focus();  
alert("Please tell us how you learned about this course by selecting an option from the drop-down menu.");  
return false;  
}

E.g.