Hello,
I am using the built-in survey designer from LabKey.
In the form it creates I would like to hide the "Survey Label" field. From the documentation, it seems that an option exists: "useDefaultLabel":true (info from this "page": https://www.labkey.org/wiki/home/Documentation/page.view?name=surveyOptions)
However, this option does not seem to be taken into account. The "Survey Label" field stays visible, and required, on the page of the form.
Could you please let me know if I am using this option wrongly ?
For info, when I try the option "labelCaption", I get the expected update of the "Survey Label".
many thanks for your help,
Vincent.
---- JSON config
{
"survey" : {
"useDefaultLabel": true,
"layout" : "auto",
"showCounts" : false,
"sections" : [ {
"questions" : [ {
.... |
|
Jon (LabKey DevOps) responded: |
2015-09-29 11:00 |
Hi Vincent,
You will need to nest the options in a start object, like this:
"start" : {
"useDefaultLabel" : true
"layout" : "auto",
"showCounts" : false,
...
},
Regards,
Jon |
|
vincentR responded: |
2015-10-01 03:17 |
Hi Jon,
many thanks for your quick reply, however I still have the same issue even with the modification you suggest:
{
"survey" : {
"start" : {
"useDefaultLabel": true,
"layout" : "auto",
"showCounts" : false,
"description" : null
},
"sections" : [ {
"description" : null,
"header" : true,
"title" : "LabkeyMIC Access Requests",
"collapsible" : true,
"questions" : [ {
...
}
Could you please share with me a JSON description which behaves as expected when it comes to hidding "Sudy Label"
many thanks,
Vincent. |
|
Jon (LabKey DevOps) responded: |
2015-10-01 13:12 |
Hi Vincent,
It would actually be better if you could provide me with your code instead. I was able to hide the survey label without any issue.
What I did was to follow this tutorial to make a list with a few fields, then use the survey page to generate my questions:
https://www.labkey.org/wiki/home/Documentation/page.view?name=survey
This created the ExtJS that started like this:
{
"survey" : {
"layout" : "auto",
"showCounts" : false,
"sections" : [ {
"questions" : [ {
"name" : "FirstName",
"caption" : "FirstName",
"shortCaption" : "FirstName",
"hidden" : false,
"jsonType" : "string",..........
All I did was this:
{
"survey" : {
"layout" : "auto",
"showCounts" : false,
"start": {
"useDefaultLabel": true
},
"sections" : [ {
"questions" : [ {
"name" : "FirstName",
"caption" : "FirstName",
"shortCaption" : "FirstName",
"hidden" : false,
"jsonType" : "string",........
Can you give this a try?
Regards,
Jon |
|
vincentR responded: |
2015-10-01 13:51 |
Hi Jon,
I followed your instructions, but I still can't hide the 'Survey Label'.
I have forgotten to specify that our LabKey server runs under 14.3.
For information, in the coming weeks, it is planned to upgrade our server to 15.2.
Maybe I should wait for the upgrade to test again this survey feature.
many thanks again for your help,
best,
Vincent. |
|
Jon (LabKey DevOps) responded: |
2015-10-01 14:11 |
Hi Vincent,
Now that makes more sense. We didn't implement the "start" option until 15.1, so when you do upgrade, that feature will work.
Regards,
Jon |
|
|
|