Question T1421
Visible to All Users

Disable name text field for a custom question added to the toolbox

created 6 years ago

Hi Guys,

I am adding a custom question to the toolbar using:

var dbData = JSON.parse("{"name": "postSecondaryPathToolbox", "iconName": "icon-default", "title": "Postsecondary Path", "category": "Portfolio", "json": { "type": "dropdown", "name" : "postsecondarypath", "title": "What is your plan after high school?", "choices": [ "Undecided", "Four-year college", "Two-year college " ] } }");

this.survey.toolbox.addItem(dbData);

This works fine.

Is there a way to prevent the survey builder user from changing the name and/or all the properties of that question after they add it to the survey in the survey builder? But only that custom question, they should be able to modify all the other questions as normal.

Thanks,

Rich

Answers approved by surveyjs Support

created 6 years ago

Hello Richard,
Unfortunately, there is no way to make a property title read-only for a particular object/question. You can make a property for a particular object invisible by using editor.onCanShowProperty event or make a property read-only for all objects/questions.
We have the same suggestion on GitHub . Additionally to the event, described in this GitHub issue, we have to disable in-place title editing in the question in our designer.
We did not implement the initial suggestion/event, since it requires 2-3 hours of coding/testing and the only person, who asked it before, was not really interested. He did not even come back and ask again, as he promised.
This functionality is in our TODO list. If we have more requests or somebody from our paid customers require this functionality, we will move it from our baglog into task cards for the next one-week iteration.

Thank you,
Andrew
SurveyJS Team