Versions Compared

Key

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

...

  1. Click on Modules.
  2. Select the Module with the appropriate form field.
  3. Select Forms tab.
  4. Select Master form.
  5. User filter to find field that is intended to be made readonly.
  6. Select edit on the field.
  7. Select Cutsom JavaScript tab.
  8. Within the “init” section type:

if (formScope.formdata["state"].toUpperCase() === 'Initial'.toUpperCase()) {

fieldScope.fieldSchema.readOnly = true;

fieldScope.readOnly = true;

}

9.  Select Update.

10. Select Save for the form.

...

Note: This example sets the field to read only based on the “Initial” state condition. If you wish to change it in a different state, this may be edited to the current state appropriate to where it is implemented . For example, if a form is set to “Initial” state you could use this condition

!== 'Initial'.toUpperCase()


To default to read only state on a form in the “Initial” state.

Or by state of “Pending”:


if (formScope.formdata["state"].toUpperCase()  === 'Pending'.toUpperCase()) {

fieldScope.fieldSchema.readOnly = true;

fieldScope.readOnly = true;

}


Info

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@8fc
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "step-by-step" and type = "page" and space = "HD"
labelsStep-by-step

...