enum_info(type, enum[, rawList = false])


Returns a list of the possible values of an enum property.
If the rawList flag is set to “true”, a simple list will be returned. If it is omitted or set to false, a list of objects will be returned (so it can be used in a repeater element)


An enum property words is defined on the type Doge with format = “such, choices, much, awesome”

  1. ${enum_info(“Doge”, “words”)}
  2. ${enum_info(“Doge”, “words”, true)}

would yield

  1. [{value: “such”}, {value: “choices”}, {value: “much”}, {value: “awesome”}]
  2. [“such”, “choices”, “much”, “awesome”]
About this article
Last change 2018-05-04
Topics Structr 2.1