Show Message based on previous selected item
See original GitHub issueAre you requesting a feature, reporting a bug or asking a question?
Question
What is the current behavior?
I’m using smarty to show date of the selected item only (checkbox or dropdown)
but the messages display the information of all item, even those are not selected
What is the expected behavior?
I would like to display the information for only the selected item
How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
https://i.im.ge/2022/06/23/uXGcBW.gif
{literal}
<script type="text/javascript">Survey
.StylesManager
.applyTheme("defaultV2");
var json = {
"pages": [
{
"locale": "fr",
"name": "page1",
"elements": [
{
"type": "radiogroup",
"name": "Commandes",
"isRequired": true,
"title": "Merci de choisir la commande",
"colCount": 3,
"choicesOrder": "asc",
"choices": [ {/literal} {foreach from=$orders item=order}
"{$order.details.reference}",
{/foreach}{literal} ]
},{
"type": "html",
"name": "DétailsCommande",
"isRequired": false,
"visibleIf": "{Commandes.length} > 1",
"title": " ",
"choicesFromQuestion": "Commandes",
"choicesFromQuestionMode": "selected",
<!--it should shows the order date of the selected "name": "Commandes"-->
"html": "{/literal} {foreach from=$orders item=order} {$order.details.order_date}{/foreach}{literal}"
},
Specify your
- browser:Chrome
- browser version:Version 102.0.5005.115 (Official Build) (64-bit)
- surveyjs platform jquery
- surveyjs version:1.9.2
Issue Analytics
- State:
- Created a year ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@go-sudo opSystem should be “checkbox”. Here is the updated example You are requested opSystem value to be an array.
Thank you, Andrew
Hi @andrewtelnov
Thanks to you, I Found a solution to my issue, I appreciate your help