Question T9442
Visible to All Users

Can't find way change question type title

created 3 years ago

I've used

JavaScript
creator.toolbox.getItemByName("boolean").title = "True / False"; creator.toolbox.getItemByName("boolean").tooltip = "True / False";

to change the name of question type 'boolean' to 'True / False'.

See how it looks in the images below.

But also notice how on the bottom left of the question. It still says 'Boolean'. How can I also change this text to 'True / False'.

Please let me know. Thank you very much!

Answers approved by surveyjs Support

created 3 years ago

Hello,
In this case, it is better to use a different approach. You can change localization strings:

JavaScript
const translations = SurveyCreator.localization.getLocale('en'); translations.qt.boolean = 'True / False';

Thank you,
Andrew
SurveyJS Team