Hi
titleLocation="hidden" in paneldynamic hides all template questions title. I would expect to hide the paneldynamic question title only
https://plnkr.co/edit/BrJ1V5wVcbQPNAlM
thank you
Hi
titleLocation="hidden" in paneldynamic hides all template questions title. I would expect to hide the paneldynamic question title only
https://plnkr.co/edit/BrJ1V5wVcbQPNAlM
thank you
Hello,
Inner question titles are also hidden because the templateTitleLocation
is set to inherit
by default. Therefore, it also gets the hidden
value.
To hide the Dynamic Panel's title and preserve titles of inner elements, set the templateTitleLocation
to a required value. For instance, set it to "top"
.
The updated survey JSON is shown below.
JSON{
"pages": [
{
"name": "page1",
"elements": [
{
"type": "paneldynamic",
"name": "vacation-info",
"title": "Enter information about your vacations",
"titleLocation": "hidden",
"templateElements": [
{
"type": "dropdown",
"name": "country",
"title": "Select a country",
"choicesByUrl": {
"url": "https://surveyjs.io/api/CountriesExample",
"valueName": "name"
}
},
{
"type": "text",
"name": "start-date",
"visibleIf": "{panel.country} notempty",
"title": "Select a vacation start date",
"defaultValueExpression": "today()",
"inputType": "date"
},
{
"type": "text",
"name": "end-date",
"visibleIf": "{panel.country} notempty",
"startWithNewLine": false,
"title": "Select a vacation end date",
"defaultValueExpression": "today(10)",
"validators": [
{
"type": "expression",
"text": "End date should be greater than start date",
"expression": "{panel.start-date} < {panel.end-date}"
}
],
"inputType": "date"
},
{
"type": "html",
"name": "days-spent",
"visibleIf": "{panel.country} notempty and {panel.start-date} notempty and {panel.end-date} notempty and {panel.start-date} < {panel.end-date}",
"titleLocation": "left",
"readOnly": true,
"html": "<b>Days spent in {panel.country}</b>: {panel.diffdays}"
},
{
"type": "expression",
"name": "diffdays",
"visible": false,
"expression": "iif({panel.start-date} < {panel.end-date}, diffDays({panel.start-date}, {panel.end-date}), 0)"
}
],
"panelCount": 1,
"maxPanelCount": 10,
"confirmDelete": true,
"templateTitleLocation": "top"
}
]
}
],
"showQuestionNumbers": "off"
}
Let me know if you have further questions.