oCourse.HTMLSourceList ​
Adds the 'How did you hear about this registration?' drop down to the Enrollment Cart, populated with Tracking codes.
ACEweb Routines/Templates ​
Required Parameters ​
None
Optional Parameters ​
- 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.
- Numeric value specifying tabindex value.
- 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.
- Alternate HTML Field Name, entered in quotes (defaults to "lstTrackCode", the name expected by the XReg method).
- 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
- Sort Order Specification, entered in quotes:
"Source" - sorts by description (default) "IDKey" - sorts by code.
- Additional HTMLÂ attributes, enclosed in quotation marks or brackets (e.g. [class="required"]).
- Radio flag. If set (.T.) choices will be shown as radio buttons rather than in a drop-down list.
- Radio button attributes, entered in quotes. HTML attributes applied to the buttons.
- Button prefix, in quotes. Text inserted before each radio tag.
- 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
- 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.