Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Online demo to demonstrate how to use ConfiForms Field Definition to change the field's label

Via dialog

ConfiForms (FormView) Registrations Control
formNamemyform


Embedded form

ConfiForms (FormView) Registrations Control
formNamemyform
embeddedtrue


trueINLINE
ConfiForms Form Definition
formNamemyform
registrationFormTitleClick on change field to see the label change

changeChangecheckbox

fldOriginal label texttext

change:truechangeLabel(formName, formId);Run custom JavaScriptchange

change:falsesetInitialLabel(formName, formId);Run custom JavaScriptchange

HTML
<script>
  function changeLabel(formName, formId) {
    if (isPageViewMode()) {
      AJS.$(formName).find('.i_holdingrow_fld').find('#i_labelfor_fld').html('New label text text<span style="color:red;font-weight: bolder;float: right;font-size: larger;">*</span>');
    }
  }

  function setInitialLabel(formName, formId) {
    if (isPageViewMode()) {
      AJS.$(formName).find('.i_holdingrow_fld').find('#i_labelfor_fld').html('Original label text');
    }
  }


  function isPageViewMode() {
   return AJS.$('#wysiwygTextarea_ifr').length === 0;
  }

</script>

...