     entry.append('label').attr("for", id).text(name)
     selection = entry.append(nodeType).attr("id",id)
     extras = f.call(selection) or {}
+
+    # Define the default function for enabling/disabling a form property
+    extras.disable ?= (sel, disable) ->
+      sel.attr('disabled', if disable then true else undefined)
 
     if extras.key?
       key = extras.key

          datepicker.range(options.startDate, options.endDate, false, true)

      else
        getValue = ->
          datepicker.date()

        setValue = (value) ->
          datepicker.date(value)

      {key: options.key, componentNode: elem, getValue: getValue, setValue: setValue}
    this

  addTimePicker: (name, options = {}) ->
    @add name, 'timepicker', 'div', ->
      elem = @append('div').node()

      timepicker = new hx.TimePicker(elem, options.timePickerOptions)

      if options.disabled
        timepicker.disable()

      getValue = ->
        timepicker.date()

      setValue = (value) ->
        timepicker.date(value)

      {key: options.key, componentNode: elem, getValue: getValue, setValue: setValue}
    this

  addDateTimePicker: (name, options = {}) ->
    @add name, 'datetimepicker', 'div', ->
      elem = @append('div').node()

      datetimepicker = new hx.DateTimePicker(elem, options.dateTimePickerOptions)

      if options.disabled
        datetimepicker.disable()

      getValue = ->
        datetimepicker.date()

      setValue = (value) ->
        datetimepicker.date(value)

      {key: options.key, componentNode: elem, getValue: getValue, setValue: setValue}
    this

  addSubmit: (text, icon, submitAction) ->
    hx.select(@selector).append('button')

          when 'datepicker', 'timepicker', 'datetimepicker' then it.extras.setValue(value)
          else hx.select(node).value(value)
      else
        if not it.hidden and not it.disabled
          value = switch it.type
            when 'checkbox' then hx.select(it.node).prop('checked')
            when 'radio' then hx.select(it.node).select('input:checked').value()
