This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:create:inputs-single [17.03.2021 20:49] – [Selection and Dropdown] sophia.schauer | en:create:inputs-single [17.03.2021 20:52] (current) – [Extended Selection and Text] sophia.schauer | ||
---|---|---|---|
Line 66: | Line 66: | ||
<code javascript> | <code javascript> | ||
<script type=" | <script type=" | ||
- | QuestionSelect.LinkSelect2Text(" | + | S2Selection.linkOptionToInput(" |
</ | </ | ||
</ | </ | ||
- | The first parameter in the function `QuestionSelect.LinkSelect2Text()` specifies the HTML ID of the radio button or checkbox, in the example the option with the code 12 in question AU01 (an extended selection that allows multiple choice selection). The second parameter is the HTML identifier of the corresponding text input (here the first input in question TE01). | + | The first parameter in the function `S2Selection.linkOptionToInput()` specifies the HTML ID of the radio button or checkbox, in the example the option with the code 12 in question AU01 (an extended selection that allows multiple choice selection). The second parameter is the HTML identifier of the corresponding text input (here the first input in question TE01). |
The function `prepare_input ()` (in the PHP code at the top of the page) would have been used in this example for the identifier '' | The function `prepare_input ()` (in the PHP code at the top of the page) would have been used in this example for the identifier '' | ||
Line 78: | Line 78: | ||
<code javascript> | <code javascript> | ||
<script type=" | <script type=" | ||
- | new S2Selection.LinkSelect2Text(" | + | S2Selection.linkOptionToInput(" |
- | new S2Selection.LinkSelect2Text(" | + | S2Selection.linkOptionToInput(" |
- | new S2Selection.LinkSelect2Text(" | + | S2Selection.linkOptionToInput(" |
</ | </ | ||
</ | </ |