Question T10231
Visible to All Users

How to display error for QuestionRadiogroup choices?

created 2 years ago

Hi,

I want to have the choice coding values for QuestionRadiogroup be unique. Using the onPropertyValidationCustomError(editor, options) handler on the editor I am able to attach a custom event that checks if the values are unique. If they are not, I want to display an error letting the user know that the values must be unique.

When testing the event handler with non-unique coding values, the properties window does not close but no error is displayed. options.obj.hasError() is always false, even after setting options.error. Is there a way to display the error for QuestionRadiogroup?

Best,
Skip

Answers approved by surveyjs Support

created 2 years ago

Hello Skip,
What version of Survey Creator do you use?

Thank you,
Andrew
SurveyJS Team

    Show previous comments (7)

      Yes, it is survey-creator. You don't need survey-jquery. Plus you are using an older version of it.
      Please make sure that all packages have the same version.

      Thank you,
      Andrew
      SurveyJS Team

        Upgrading to version 1.8.78 solved the issue. There was a bug fix in that version that fixed the issue of errors not showing for properties when the property window is modal.

        Thanks for all your help with this!

        Best,
        Skip

          You are very welcome!

          Andrew
          SurveyJS Team
          If you like our products, please take a moment to share your experience with our company by contributing a short review for SurveyJS page at g2.com or at Trustpilot.com.
          As we’re building our business, every review helps build credibility for future customers and your feedback would be greatly appreciated.