Skip to content

How to create a combo box with options from the list and select the option with the value in the data? #257

Answered by daliboris
daliboris asked this question in Q&A
Discussion options

You must be logged in to vote

Thak you, @JoernT, for the explanation.

I made a mistake in the @ref attribute: it should refer to the @who attribute of the <change> element. Following code works:

 <fx-repeat id="r-change" ref="revisionDesc/change">
   <template>
       <fx-control class="who" ref="@who">
         <select ref="instance('editors')/respStmt" class="widget">
           <template>
             <option value="{concat('#', @xml:id)}">{./name}</option>
           </template>
         </select>
       </fx-control>
       <fx-control class="who" id="who" ref="@who"></fx-control>
       <fx-control class="status" id="change-status" ref="@status"></fx-control>
       <fx-control class="when" id="change-when" ref="@…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@JoernT
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by daliboris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants