Question T127
Visible to All Users

VisibleIf - Will it work without 'name' filled in?

created 7 years ago

The users of my site that's using SurveyJS have shown that they're a bit confused by the "Title" vs. "Name" in the question configuration. They'd like me to remove 'name', if possible.

Will they still be able to use the 'visibleIf' functionality if 'name' is removed (meaning it will always be blank)? Would the library then default to using 'title' as part of the condition checking if name is blank?

Answers

created 7 years ago

I would suggest to make this property invisible.
JsonObject.metaData.findProperty("questionbase", "name").visible = false;
You should call this code before creating the Editor.

Thank you,
Andrew

    Show previous comments (8)

      Andrew…

      This is very weird, but I haven't changed the survey builder version that I have, but I'm now unable to access SurveyEditor.defaultStrings. It's undefined.

      Is there another "path" to the defaultStrings property?

        It works as expected, Here is the demo to change name property title to "My Name": https://plnkr.co/edit/grQ1H51zBlFZGMsuGZ77?p=preview

        Thank you,
        Andrew

          Okay, I'm not sure why I can't access SurveyEditor.defaultStrings anymore, but was able to get to them via "SurveyEditor.editorLocalization.locales.en.p.name" and "SurveyEditor.editorLocalization.locales.en.pe.name"