Radio Button

When i want to click on radio button then it displays the below selection layout

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    A Score Level 1
    in reply to Harsha
    Could not display interface. Please check definition and inputs.
    Interface Definition: Expression evaluation error at function a!formLayout [line 125]: Invalid index: Cannot index property 'Challan' of type Text into type List of Text String
  • 0
    A Score Level 1
    in reply to Narmada
    I have taken one radio button named payment type & first button named online second button named Challan when i want to click on challan button i want to display below selection layout
  • I am attaching a sample code to achieve the same. Refer this and share your code if you are having any trouble after this.

      a!formLayout(
      label: "",
      contents: {
        a!sectionLayout(
          label: "",
          contents: {
            a!radioButtonField(
              label: "Payment Type",
              labelPosition: "ABOVE",
              choiceLabels: {"Online", "Challan"},
              choiceValues: {1, 2},
              value:ri!val,
              saveInto:ri!val,
              choiceLayout: "STACKED",
              validations: {}
            )
            
          }
        ),
       if(ri!val=2,
         a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!sectionLayout(
                  label: "Lorem Ipsum",
                  contents: {
                    a!textField(
                      label: "Lorem Ipsum",
                      labelPosition: "ABOVE",
                      saveInto: {},
                      refreshAfter: "UNFOCUS",
                      validations: {}
                    )
                  }
                )
              }
            ),
            a!columnLayout(
              contents: {
                a!sectionLayout(
                  label: "Lorem Ipsum",
                  contents: {
                    a!textField(
                      label: "Lorem Ipsum",
                      labelPosition: "ABOVE",
                      saveInto: {},
                      refreshAfter: "UNFOCUS",
                      validations: {}
                    )
                  }
                )
              }
            )
          }
        ),{})
      }
    )