Question T14339
Visible to All Users

Setting default question type to Radio Group

created a year ago

Hi team,

I can't seem to find anything relating to my issue but I'm hoping it's straight forward…

We are limiting the question types to Radio Group only, however when we click "Add Question" it defaults to "text" question type (see below). How can I change it so that when you add a new question it's always set to Radio Button Group question type?

Clipboard-File-1.png

Thanks

Answers approved by surveyjs Support

created a year ago

Hello Jack,
You can update the designer.defaultAddQuestionType property of Survey Creator settings. To add a Radiogroup question, set this property to 'radiogroup'.

JavaScript
import { settings } from "survey-creator-core"; settings.designer.defaultAddQuestionType = "radiogroup";

Please let me know if you have any further questions.

P.S. I would like to make this ticket public. Please inform me if you have no objections.

Thanks

    Comments (2)
    JS JS
    Jack Southall a year ago

      Thanks Jane.

      How would I go about setting this property using a jQuery setup? Struggling to figure out where this would be:

      Clipboard-File-1.png

      Thanks!

        Hi Jack,
        Please access the settings object from the SurveyCreator module as follows:

        JavaScript
        SurveyCreator.settings.designer.defaultAddQuestionType = "radiogroup";

        Let me know if you have any further questions.