.

=a!formLayout(

  label: "Hiring Request Form",

  contents: {

    

    /* Section: Request Information */

    a!sectionLayout(

      label: "Request Information",

      contents: {

        a!radioButtonField(

          label: "Are you making this hiring request on behalf of yourself or someone else?",

          choiceLabels: {"Myself", "For Someone Else"},

          choiceValues: {"Myself", "For Someone Else"},

          value: ri!requestFor,

          saveInto: ri!requestFor

        ),

        a!radioButtonField(

          label: "What type of hire do you need?",

          choiceLabels: {"Non-Employee", "Direct Staff"},

          choiceValues: {"Non-Employee", "Direct Staff"},

          value: ri!hireType,

          saveInto: ri!hireType

        ),

        a!radioButtonField(

          label: "What type of request would you like to make?",

          choiceLabels: {"Add New Role", "Request Replacement", "Request Conversion"},

          choiceValues: {"Add New Role", "Request Replacement", "Request Conversion"},

          value: ri!requestType,

          saveInto: ri!requestType

        )

      }

    ),

 

    /* Section: Incumbent Details */

    a!sectionLayout(

      label: "Incumbent Details",

      showWhen: ri!requestType = "Request Replacement",

      contents: {

        a!textField(

          label: "Please provide the incumbent's name",

          value: ri!incumbentName,

          saveInto: ri!incumbentName

        ),

        a!dateField(

          label: "Departure Date",

          value: ri!departureDate,

          saveInto: ri!departureDate

        ),

        a!textField(

          label: "Position ID for this role in R@C (15 characters max)",

          value: ri!positionId,

          saveInto: ri!positionId,

          maxLength: 15

        ),

        a!dropdownField(

          label: "Incumbent's C-Level at Time of Departure",

          choiceLabels: {"C1", "C2", "C3", "C4", "C5"},

          choiceValues: {"C1", "C2", "C3", "C4", "C5"},

          value: ri!cLevel,

          saveInto: ri!cLevel

        )

      }

    ),

 

    /* Section: C-Level Change */

    a!sectionLayout(

      label: "C-Level Change Request",

      showWhen: ri!requestType = "Request Replacement",

      contents: {

        a!radioButtonField(

          label: "Would you like to request for the role's C-level to be changed?",

          choiceLabels: {"Yes", "No"},

          choiceValues: {"Yes", "No"},

          value: ri!cLevelChange,

          saveInto: ri!cLevelChange

        ),

        a!dropdownField(

          label: "Please select the C-Level for this Role",

          choiceLabels: {"C1", "C2", "C3", "C4", "C5"},

          choiceValues: {"C1", "C2", "C3", "C4", "C5"},

          value: ri!newCLevel,

          saveInto: ri!newCLevel,

          showWhen: ri!cLevelChange = "Yes"

        ),

        a!paragraphField(

          label: "Explanation for the Change",

          value: ri!explanation,

          saveInto: ri!explanation,

          showWhen: ri!cLevelChange = "Yes",

          maxLength: 250

        )

      }

    ),

 

    /* Section: Current Role Location */

    a!sectionLayout(

      label: "Current Role Location",

      contents: {

        a!textField(

          label: "What is the current location of this role?",

          value: ri!roleLocation,

          saveInto: ri!roleLocation

        )

      }

    )

  },

  buttons: a!buttonLayout(

    primaryButtons: {

      a!buttonWidget(

        label: "Next",

        style: "PRIMARY",

        saveInto: {} /* Add save actions here */,

        validate: true

      )

    },

    secondaryButtons: {

      a!buttonWidget(

        label: "Cancel",

        style: "NORMAL"

      )

    }

  )

)

  Discussion posts and replies are publicly visible

Top Replies

Parents
  • 0
    Certified Associate Developer

    Hi  ,

    You need to use characterLimit, but you've used maxLength. Please replace that. Also, you have used PRIMARY and Normal as button styles, but you should use Primary or Secondary or any other valid hexacode or null, depending on your buttons or as per the requirements.

  • 0
    Certified Associate Developer
    in reply to gayatria0439

    here is the Updated code

    a!formLayout(
      label: "Hiring Request Form",
      contents: {
        /* Section: Request Information */
        a!sectionLayout(
          label: "Request Information",
          contents: {
            a!radioButtonField(
              label: "Are you making this hiring request on behalf of yourself or someone else?",
              choiceLabels: { "Myself", "For Someone Else" },
              choiceValues: { "Myself", "For Someone Else" },
              value: ri!requestFor,
              saveInto: ri!requestFor
            ),
            a!radioButtonField(
              label: "What type of hire do you need?",
              choiceLabels: { "Non-Employee", "Direct Staff" },
              choiceValues: { "Non-Employee", "Direct Staff" },
              value: ri!hireType,
              saveInto: ri!hireType
            ),
            a!radioButtonField(
              label: "What type of request would you like to make?",
              choiceLabels: {
                "Add New Role",
                "Request Replacement",
                "Request Conversion"
              },
              choiceValues: {
                "Add New Role",
                "Request Replacement",
                "Request Conversion"
              },
              value: ri!requestType,
              saveInto: ri!requestType
            )
          }
        ),
        /* Section: Incumbent Details */
        a!sectionLayout(
          label: "Incumbent Details",
          showWhen: ri!requestType = "Request Replacement",
          contents: {
            a!textField(
              label: "Please provide the incumbent's name",
              value: ri!incumbentName,
              saveInto: ri!incumbentName
            ),
            a!dateField(
              label: "Departure Date",
              value: ri!departureDate,
              saveInto: ri!departureDate
            ),
            a!textField(
              label: "Position ID for this role in R@C (15 characters max)",
              value: ri!positionId,
              saveInto: ri!positionId,
              characterLimit: 15
            ),
            a!dropdownField(
              label: "Incumbent's C-Level at Time of Departure",
              choiceLabels: { "C1", "C2", "C3", "C4", "C5" },
              choiceValues: { "C1", "C2", "C3", "C4", "C5" },
              value: ri!cLevel,
              saveInto: ri!cLevel
            )
          }
        ),
        /* Section: C-Level Change */
        a!sectionLayout(
          label: "C-Level Change Request",
          showWhen: ri!requestType = "Request Replacement",
          contents: {
            a!radioButtonField(
              label: "Would you like to request for the role's C-level to be changed?",
              choiceLabels: { "Yes", "No" },
              choiceValues: { "Yes", "No" },
              value: ri!cLevelChange,
              saveInto: ri!cLevelChange
            ),
            a!dropdownField(
              label: "Please select the C-Level for this Role",
              choiceLabels: { "C1", "C2", "C3", "C4", "C5" },
              choiceValues: { "C1", "C2", "C3", "C4", "C5" },
              value: ri!newCLevel,
              saveInto: ri!newCLevel,
              showWhen: ri!cLevelChange = "Yes"
            ),
            a!paragraphField(
              label: "Explanation for the Change",
              value: ri!explanation,
              saveInto: ri!explanation,
              showWhen: ri!cLevelChange = "Yes",
              characterLimit: 250
            )
          }
        ),
        /* Section: Current Role Location */
        a!sectionLayout(
          label: "Current Role Location",
          contents: {
            a!textField(
              label: "What is the current location of this role?",
              value: ri!roleLocation,
              saveInto: ri!roleLocation
            )
          }
        )
      },
      buttons: a!buttonLayout(
        primaryButtons: {
          a!buttonWidget(
            label: "Next",
            style: "SOLID",
            /* Add save actions here */
            saveInto: {},
            validate: true
          )
        },
        secondaryButtons: {
          a!buttonWidget(
            label: "Cancel",
            style: "SOLID",
            color: "NEGATIVE"
          )
        }
      )
    )

Reply
  • 0
    Certified Associate Developer
    in reply to gayatria0439

    here is the Updated code

    a!formLayout(
      label: "Hiring Request Form",
      contents: {
        /* Section: Request Information */
        a!sectionLayout(
          label: "Request Information",
          contents: {
            a!radioButtonField(
              label: "Are you making this hiring request on behalf of yourself or someone else?",
              choiceLabels: { "Myself", "For Someone Else" },
              choiceValues: { "Myself", "For Someone Else" },
              value: ri!requestFor,
              saveInto: ri!requestFor
            ),
            a!radioButtonField(
              label: "What type of hire do you need?",
              choiceLabels: { "Non-Employee", "Direct Staff" },
              choiceValues: { "Non-Employee", "Direct Staff" },
              value: ri!hireType,
              saveInto: ri!hireType
            ),
            a!radioButtonField(
              label: "What type of request would you like to make?",
              choiceLabels: {
                "Add New Role",
                "Request Replacement",
                "Request Conversion"
              },
              choiceValues: {
                "Add New Role",
                "Request Replacement",
                "Request Conversion"
              },
              value: ri!requestType,
              saveInto: ri!requestType
            )
          }
        ),
        /* Section: Incumbent Details */
        a!sectionLayout(
          label: "Incumbent Details",
          showWhen: ri!requestType = "Request Replacement",
          contents: {
            a!textField(
              label: "Please provide the incumbent's name",
              value: ri!incumbentName,
              saveInto: ri!incumbentName
            ),
            a!dateField(
              label: "Departure Date",
              value: ri!departureDate,
              saveInto: ri!departureDate
            ),
            a!textField(
              label: "Position ID for this role in R@C (15 characters max)",
              value: ri!positionId,
              saveInto: ri!positionId,
              characterLimit: 15
            ),
            a!dropdownField(
              label: "Incumbent's C-Level at Time of Departure",
              choiceLabels: { "C1", "C2", "C3", "C4", "C5" },
              choiceValues: { "C1", "C2", "C3", "C4", "C5" },
              value: ri!cLevel,
              saveInto: ri!cLevel
            )
          }
        ),
        /* Section: C-Level Change */
        a!sectionLayout(
          label: "C-Level Change Request",
          showWhen: ri!requestType = "Request Replacement",
          contents: {
            a!radioButtonField(
              label: "Would you like to request for the role's C-level to be changed?",
              choiceLabels: { "Yes", "No" },
              choiceValues: { "Yes", "No" },
              value: ri!cLevelChange,
              saveInto: ri!cLevelChange
            ),
            a!dropdownField(
              label: "Please select the C-Level for this Role",
              choiceLabels: { "C1", "C2", "C3", "C4", "C5" },
              choiceValues: { "C1", "C2", "C3", "C4", "C5" },
              value: ri!newCLevel,
              saveInto: ri!newCLevel,
              showWhen: ri!cLevelChange = "Yes"
            ),
            a!paragraphField(
              label: "Explanation for the Change",
              value: ri!explanation,
              saveInto: ri!explanation,
              showWhen: ri!cLevelChange = "Yes",
              characterLimit: 250
            )
          }
        ),
        /* Section: Current Role Location */
        a!sectionLayout(
          label: "Current Role Location",
          contents: {
            a!textField(
              label: "What is the current location of this role?",
              value: ri!roleLocation,
              saveInto: ri!roleLocation
            )
          }
        )
      },
      buttons: a!buttonLayout(
        primaryButtons: {
          a!buttonWidget(
            label: "Next",
            style: "SOLID",
            /* Add save actions here */
            saveInto: {},
            validate: true
          )
        },
        secondaryButtons: {
          a!buttonWidget(
            label: "Cancel",
            style: "SOLID",
            color: "NEGATIVE"
          )
        }
      )
    )

Children
No Data