Checkbox inside Hamburger Button

Certified Associate Developer

Is it possible to fold options in checkboxField inside Hamburger like button (to have the behavior of dropdown) in Appian?

  Discussion posts and replies are publicly visible

Parents
  • You can combine a!richTextDisplayField() and a!checkboxField() to achieve a similar result, where the checkboxes show under the buttons when clicked.  It would require a re-click on the buttons to hide the checkboxes however, vs a javascript type setup where they auto-collapse by clicking elsewhere randomly on the form, or as popups that do not expand the form.

    Some sample code:

    a!localVariables(
      local!options: {"Option 1","Option 2","Option 3"},
      local!data: {
        {visible: false, selected: null},
        {visible: false, selected: null},
        {visible: false, selected: null}
      },
      
      a!forEach(
        items: local!data,
        expression: {
          a!richTextDisplayField(
            labelPosition: "COLLAPSED",
            value: {
              a!richTextIcon(
                icon: "ellipsis-v",
                link: a!dynamicLink(
                  saveInto: a!save(local!data[fv!index].visible,not(fv!item.visible))
                )
              )
            }
          ),
          a!checkboxField(
            labelPosition: "COLLAPSED",
            showWhen: fv!item.visible,
            choiceLabels: local!options,
            choiceValues: local!options,
            value: if(
              rule!APN_isEmpty(fv!item.selected),
              null,
              split(fv!item.selected,";")
            ),
            saveInto: a!save(local!data[fv!index].selected,joinarray(save!value,";"))
          )
        }
      )
    )

Reply
  • You can combine a!richTextDisplayField() and a!checkboxField() to achieve a similar result, where the checkboxes show under the buttons when clicked.  It would require a re-click on the buttons to hide the checkboxes however, vs a javascript type setup where they auto-collapse by clicking elsewhere randomly on the form, or as popups that do not expand the form.

    Some sample code:

    a!localVariables(
      local!options: {"Option 1","Option 2","Option 3"},
      local!data: {
        {visible: false, selected: null},
        {visible: false, selected: null},
        {visible: false, selected: null}
      },
      
      a!forEach(
        items: local!data,
        expression: {
          a!richTextDisplayField(
            labelPosition: "COLLAPSED",
            value: {
              a!richTextIcon(
                icon: "ellipsis-v",
                link: a!dynamicLink(
                  saveInto: a!save(local!data[fv!index].visible,not(fv!item.visible))
                )
              )
            }
          ),
          a!checkboxField(
            labelPosition: "COLLAPSED",
            showWhen: fv!item.visible,
            choiceLabels: local!options,
            choiceValues: local!options,
            value: if(
              rule!APN_isEmpty(fv!item.selected),
              null,
              split(fv!item.selected,";")
            ),
            saveInto: a!save(local!data[fv!index].selected,joinarray(save!value,";"))
          )
        }
      )
    )

Children