<element> constructs describe the inputs to be collected by the online form.


Below is a list of the <element> types as of the writing of this help.  More will be added as needed in the future.


  • para - paragraph
  • phrase - a shorter text description
  • choice - creates a dropdown
  • checkbox - creates a checkbox
  • video - captures a team video URL on Youtube
  • image - for a picture
  • attachment - capture a file such as PDF
  • exp_item - a team expense item
  • there are also some specialized elements to handle
    • expense report - see below
    • currency - see below
    • kids on a team in attendance (<dcl_kidcheckbox>)


Elements also have a set of attributes.


  • type: one of the types above - this dictates the input controls displayed on the form.  Some of the types like choice have additional attributes that further define the input. choices is the additional control for a choice and defines the choices (choices="1=Yes;2=No")
  • description: this is the text associated with the element that describes the information wanted.  It is not an attribute but the text for the body of the element and can include some formatting such as bold and lists.
  • short_desc: this is a short description of an element. Some items have lengthy descriptions that make sense when displayed in a form.  In other cases such as a reference to the item (eg during checking), such a description is too lengthy.  In these situations, if a short_desc is supplied it will be used in lieu of the longer description. 
  • max: is the character length limit for a para or phrase
  • name: internal name for the element - it is used to name the actual element in the form
  • lid, clid: supports both sharing text across controls and supports the text in multiple languages
    The text in the description is the English text and it is associated with the lid name (for text local to a specific form - think tdf element for a challenge) or clid name(for text that is common across multiple forms - think TCE that appears in multiple forms).  A utility (admin=>manage translation) support supplying text in other languages (more here).
  • score_items: supports associating an input with a scored item
  • submit: controls checking done when the form is submitted
    • required: (the default) the element is required to have a value - it is an error if it has no value
    • optional: an informational messages is issued if the element has no value
    • checked: is for checkbox items - they are required to be checked (used primarily to acknowledge the team has done something such a review clarifications
    • info: the element is not checked for a value
    • if: is required if a if field is true
  • if: indicates this element is not always needed. The value of the field is a name=value pair. If the pair evaluates to true, the element is required; if not it is optional.  Name dictates the evaluation to perform.
    • team: in this case the value is something like level>=ML. The field is displayed and checked only if the team's level is greater-than-or-equal to ML (ie ML SL UL).  This value can be evaluated when the form is being displayed so the control is not display if it evaluates to false.  During a check for the form being fully completed, the field is only flagged as needing a value if the value evaluates to true.
    • response: in this case the value is something like ai-skill-choice=1.  This is a test of another input on the form.  ai-skill-choice is a different element.  As we can't predict the value of another field, the element is always displayed, but when checking for completeness of the form, it is only required if the value is true.


Examples:


<element type="phrase" max="150" name="tce1-phrase">

               What is your Team Choice Element 1?

       </element>


       <element type="para" max="1000" name="tce1-desc">

               Please write a brief description of your Team Choice Element. Make sure that Appraisers know 

               <b>exactly</b> what you want them to evaluate. What would you like them to know about the Team Choice Element?

       </element>


       <element type="choice" lid="visual-genre" name="visual-genre" 

               choices="architecture=Architecture; drawing=Drawing; ceramics=Ceramics; fashion=Fashion Design; graphic=Graphic Design;

                               painting=Painting; photography=Photography; printmaking=Print Making; sculpture=Sculpture">

               Table 1 Visual Art Genre

       </element>


       <element type="attachment" clid="tc-script" name="tc-script" submit="optional">

               Video Script

       </element>


Expense Reports


In most bases an element results in an input of some sort when a form is gathering info and a value when the data on a form is being displayed.  The elements expense_item and currency are an exception to this.  These elements are nested withing an <part> of type expense-table.


When gathering input, the <part> needs to:

  1. emit a button to add more expense items
  2. list the current expense items and allow them to be edited
  3. emit a control to capture the currency type
  4. list the total cost in the selected currency


When displaying the values collected, #1 and #3 are omitted.


Due to this complexity it is handled as a special case.  Using <element>s expense-item and currency outside this special part won't work.