When building a survey, I want to force a title to be entered. I want SurveyCreator to prevent saving unless a title has been entered.
Then I'd like to validate that the title is unique prior to saving.
When building a survey with SurveyCreator, can I force the designer to enter in a title?
Answers approved by surveyjs Support
Hello Marshall,
You can do the following:
Survey.Serializer.findProperty("survey", "title").isRequired = true;
.
It will make the property required. The user will be forced to enter a value on entering the title. However, it should be entered initially.
Commonly, our customers ask for a survey/form name/title on creating a new survey. After making survey property title required, Survey Creator user will not be able to enter an empty string.
Thank you,
Andrew
SurveyJS Team
Hello Marshall,
Probably you are looking for this implementation. If title is empty, it shows property grid for survey, focus title property editor and shows the error. It can be done, because Property Grid is actually a our survey widget, like all other forms in Creator.
Thank you,
Andrew
SurveyJS Team