# HG changeset patch # User bsw # Date 1632121377 -7200 # Node ID ac45e0fe122130bc07d227f29fe945139344779c # Parent 50b9d23dcbde574992856a6bf6e0bf328c1daa26 Automatically assume dropdown item id from name when id is empty diff -r 50b9d23dcbde -r ac45e0fe1221 app/main/registration/_register_form.lua --- a/app/main/registration/_register_form.lua Tue Jun 15 10:34:39 2021 +0200 +++ b/app/main/registration/_register_form.lua Mon Sep 20 09:02:57 2021 +0200 @@ -109,6 +109,9 @@ elseif field.type == "dropdown" then local options = { { id = "", name = "" } } for i_options, option in ipairs(field.options) do + if not option.id then + option.id = option.name + end table.insert(options, option) end ui.tag{ tag = "label", attr = { style = "vertical-align: bottom; border-bottom: 1px solid rgba(0,0,0, 0.12); color: #777; font-size: 16px;" }, content = field.label .. ":" }