Online demo to demonstrate how to use ConfiForms Field Definition to change the field's label
Via dialog
ConfiForms (FormView) Registrations Control |
---|
|
|
Embedded form
ConfiForms (FormView) Registrations Control |
---|
formName | myform |
---|
embedded | true |
---|
|
|
ConfiForms Form Definition |
---|
formName | myform |
---|
registrationFormTitle | Click on change field to see the label change |
---|
| trueINLINE |
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> |
...