Question T14507
Visible to All Users

Hide property "Store answers in the following JSON field"

created a year ago

Hi,

I am using SurveyCreator to create a survey and we would like to hide some creation options. I've already hidden some of them like that:

Code
import { SurveyCreator } from 'survey-creator-knockout' import { Serializer } from 'survey-core' Serializer.removeProperty('survey', 'storeOthersAsComment') Serializer.addProperty('question', { name: 'choicesByUrl', visible: false }) const surveyCreator = new SurveyCreator(options) ...

I would like to hide also the property "Store answers in the following JSON field" that we can find in the questions settings, but I am not able to do it.
Clipboard-File-1.png

I think the property is called isLoadingFromJson so I've tried this two options and none of them works

Code
Serializer.addProperty('question', { name: 'isLoadingFromJson', visible: false }) Serializer.removeProperty('question', 'isLoadingFromJson')

Do you know how to hide it? Maybe I am not using the good name of the property?

Thank you

Answers approved by surveyjs Support

created a year ago

Hello Silvia,
The Store answers in the following JSON field is called valueName. To remove this property from UI, you can disable the visible setting as follows:

JavaScript
import { Serializer } from "survey-core"; Serializer.getProperty("question", "valueName").visible = false;

Also, you can hide unnecessary properties using a special creator.onShowingProperty event. For more information on this option, please refer to the following demo: Hide a Category from the Property Grid.

Please let me know if you have any questions or require further assistance.

Thanks