How to put link inside button

I want to make a button that take me to safe link ,

i can make link separately from a alink component but i want to make it by a button

any ideas ?

  Discussion posts and replies are publicly visible

Parents
  • Hi osamag,

    Here you can find 2 diffrerent solutions for what you are asking for. 

    The first one is a Submit Link through a rich text display field and the second one is a Submit Link inside a card layout.

    a!formLayout(
      label: "Form ",
      contents: {
        a!sectionLayout(
          contents: {
            a!columnsLayout(
              columns: {
                a!columnLayout(
                  contents: {
                    a!richTextDisplayField(
                      value: a!richTextItem(
                        text: "Submit Link ",
                        size: "MEDIUM",
                        color: "ACCENT",
                        style: "STRONG",
                        link: a!submitLink(
                          confirmHeader: "Confirm Message",
                          confirmMessage: "Submit",
                          confirmButtonStyle: "PRIMARY"
                        ),
                        linkStyle: "STANDALONE"
                      )
                    ),
                    a!cardLayout(
                      contents: {
                        a!richTextDisplayField(
                          align: "CENTER",
                          marginAbove: "NONE",
                          marginBelow: "LESS",
                          value: a!richTextItem(
                            text: "Submit",
                            size: "STANDARD",
                            color: "ACCENT",
                            style: "STRONG"
                          )
                        )
                      },
                      link: a!submitLink(
                        confirmHeader: "Confirm Message",
                        confirmMessage: "Submit?",
                        confirmButtonStyle: "PRIMARY"
                      ),
                      height: "AUTO",
                      style: "NONE",
                      showBorder: true,
                      padding: "EVEN_LESS",
                      shape: "SQUARED",
                    )
                  }
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                )
              }
            )
          }
        )
      },
      buttons: a!buttonLayout(
        secondaryButtons: {
          a!buttonWidget(
            label: "Cancel",
            value: true,
            saveInto: ri!cancel,
            submit: true,
            style: "NORMAL",
            validate: false
          )
        }
      )
    )

Reply
  • Hi osamag,

    Here you can find 2 diffrerent solutions for what you are asking for. 

    The first one is a Submit Link through a rich text display field and the second one is a Submit Link inside a card layout.

    a!formLayout(
      label: "Form ",
      contents: {
        a!sectionLayout(
          contents: {
            a!columnsLayout(
              columns: {
                a!columnLayout(
                  contents: {
                    a!richTextDisplayField(
                      value: a!richTextItem(
                        text: "Submit Link ",
                        size: "MEDIUM",
                        color: "ACCENT",
                        style: "STRONG",
                        link: a!submitLink(
                          confirmHeader: "Confirm Message",
                          confirmMessage: "Submit",
                          confirmButtonStyle: "PRIMARY"
                        ),
                        linkStyle: "STANDALONE"
                      )
                    ),
                    a!cardLayout(
                      contents: {
                        a!richTextDisplayField(
                          align: "CENTER",
                          marginAbove: "NONE",
                          marginBelow: "LESS",
                          value: a!richTextItem(
                            text: "Submit",
                            size: "STANDARD",
                            color: "ACCENT",
                            style: "STRONG"
                          )
                        )
                      },
                      link: a!submitLink(
                        confirmHeader: "Confirm Message",
                        confirmMessage: "Submit?",
                        confirmButtonStyle: "PRIMARY"
                      ),
                      height: "AUTO",
                      style: "NONE",
                      showBorder: true,
                      padding: "EVEN_LESS",
                      shape: "SQUARED",
                    )
                  }
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                ),
                a!columnLayout(
                  contents: {}
                )
              }
            )
          }
        )
      },
      buttons: a!buttonLayout(
        secondaryButtons: {
          a!buttonWidget(
            label: "Cancel",
            value: true,
            saveInto: ri!cancel,
            submit: true,
            style: "NORMAL",
            validate: false
          )
        }
      )
    )

Children
No Data