Example: How to use lists as values in formmenu

INCORRECT

{choices=["choice 1", "choice 2", "choice 3"]}
{formmenu: name=choices; multiple=yes; values={=choices}}

{=choices}

CORRECT

{choiceslist=["choice 1", "choice 2", "choice 3"]}
{formmenu: name=choices; multiple=yes; values={=choiceslist}}

{=choices}

EXPLANATION

The list cannot have the same label as the formmenu command. Notice how the first example doesn't allow you to uncheck any choices. This is because the value of choices is already being set ini the first line.

In the second example, the list is named choiceslist, while the formmenu is named choices. Therefore, there is no conflict.

1 Like