There are three functions provided to grab individual form elements. However, these can’t be used until after the entire page loads, so make sure to use window.onload (or the equivalent) for any of your scripts.

fm_get_form_item_info(itemID)

  • returns: the DB entry for the form element.  Keys include ‘unique_name’, ‘nickname’, ‘required’, and others.  Check the items table in the database for a full list of keys.
  • itemID – the nickname given to the form element.

fm_get_form_item(itemID)

  • returns: the DOM object corresponding to the supplied nickname, unless the item is a checkbox / radio button list, in which case the individual list items must be accessed separately.
  • itemID – the nickname given to the form element.

fm_get_form_item_indexed(itemID, index)

  • returns: the list option corresponding to the supplied nickname and index, starting with zero.  This function should only be used for checkbox / radio button lists.
  • itemID – the nickname given to the form element.
  • index – the index of the list item, starting with zero.