   viewRowDetail.DetailViewMixins.hint = viewRowDetail.DetailViewMixins.default =
     html: ->
       @$el.addClass("card__settings__fields--active")
-      """
-      <div class="card__settings__fields__field">
-        <label for="#{@cid}">#{@model.key}: </label>
-        <span class="settings__input">
-          <input type="text" name="#{@model.key}" id="#{@cid}" class="text" />
-        </span>
-      </div>
-      """
+      viewRowDetail.Templates.textbox @cid, @model.key, @model.key, 'text'
     afterRender: ->
       @listenForInputChange()
 
   viewRowDetail.DetailViewMixins.constraint_message =
     html: ->
       @$el.addClass("card__settings__fields--active")
-      """
-      <div class="card__settings__fields__field">
-        <label for="#{@cid}">Error Message: </label>
-        <span class="settings__input">
-          <input type="text" name="#{@model.key}" id="#{@cid}" class="text" />
-        </span>
-      </div>
-      """
+      viewRowDetail.Templates.textbox @cid, @model.key, 'Error Message', 'text'
     insertInDOM: (rowView)->
       @_insertInDOM rowView.cardSettingsWrap.find('.card__settings__fields--validation-criteria').eq(0)
     afterRender: ->

  viewRowDetail.DetailViewMixins.constraint =
    html: ->
      @$el.addClass("card__settings__fields--active")
      # Validation logic (i.e. <span style='font-family:monospace'>constraint</span>):
      # <code>#{@model.get("value")}</code>
      fldUid = _.uniqueId("row-detail-field")
      """
      <div class="card__settings__fields__field">
        <label for="#{@cid}">Validation logic: </label>
        <span class="settings__input">
          <input type="text" name="#{@model.key}" id="#{@cid}" />
        </span>
      </div>
      """
    afterRender: ->
      @listenForInputChange()
    insertInDOM: (rowView) ->

  viewRowDetail.DetailViewMixins.name =
    html: ->
      @fieldTab = "active"
      @$el.addClass("card__settings__fields--#{@fieldTab}")
      viewRowDetail.Templates.textbox @cid, @model.key, @model.key, 'text'
    afterRender: ->
      @$el.find('input').eq(0).val(@model.get("value"))
      @listenForInputChange(transformFn: (value)-> $modelUtils.sluggify(value, lowerCase:false))

  viewRowDetail.DetailViewMixins.default =
    html: ->
      @fieldTab = "active"
      @$el.addClass("card__settings__fields--#{@fieldTab}")
      viewRowDetail.Templates.textbox @cid, @model.key, @model.key, 'text'
    afterRender: ->
      @$el.find('input').eq(0).val(@model.get("value"))
      @listenForInputChange()

  viewRowDetail.DetailViewMixins.calculation =
    html: -> false
