#1177 dataforms: Missing <option>s

Reporter Zash
Owner Nobody
Created
Updated
Stars ★ (1)  
Tags
  • Priority-Medium
  • Type-Defect
  • Status-Accepted
  1. Zash on

    What steps will reproduce the problem? print(dataforms.new({ { type = "list-single"; name = "abtest"; label = "A or B?"; options = { { label = "A", value = "a", default = true }, { label = "B", value = "b" }, }; }, }):form()); What is the expected output? <x xmlns="jabber:x:data" type="form"> <field label="A or B?" var="abtest" type="list-single"> <option label="A"> <value>a</value> </option> <option label="B"> <value>b</value> </option> <value>a</value> </field> </x> What do you see instead? <x xmlns="jabber:x:data" type="form"> <field label="A or B?" var="abtest" type="list-single"/> </x> What version of the product are you using? On what operating system? 3be8799263f3 (trunk) Please provide any additional information below. Furthermore, :form({abtest = "a"}) yields the following incorrect result (duplicate <value>): <x xmlns="jabber:x:data" type="form"> <field label="A or B?" var="abtest" type="list-single"> <option label="A"> <value>a</value> </option> <value>a</value> <option label="B"> <value>b</value> </option> <value>a</value> </field> </x>

New comment

Not published. Used for spam prevention and optional update notifications.