Hi!
I need to force my surveys to have TITLE fields defined for all questions.
I know that if TITLE is not defined than NAME is used, but in my code i need to check (and retrieve it) if TITLE is defined despite the presence of NAME.
How can i achieve that?
JavaScriptthis.creator.getAllQuestions().forEach(e=>{
/*
* I've tried:
* - e.title
* - e.getPropertyValue('title)
* - e.getPropertyByName('title')
* - e.hasTitle <-- checks NAME, not TITLE
* - e.fullTitle
* etc...
* Apparently all of them check the NAME property
*/
if(!e.title) //<-- check if TITLE field is filled
{
e.title = customFunctionToFormat(e.name) // <-- set TITLE with a formated NAME
}
})
Thanks!