Question T2646
Visible to All Users

Want to develop custom widget just like Expression Widgets

created 5 years ago

Hello,
I've refer This git repo for custom widgets, but i actually want to change the type of expression in my custom widgets. For example in my custom widgets called 'TotalScore' i want to expression but type should be like TotalScore, MaxScore, etc…
please guide me to achieve this result.

Thanks,
Hiren

Comments (2)

    Hello,

    Unfortunately your question sounds unclear for me. Could you please describe your scenario in greater details?

    Thanks, Serge
    SurveyJS Team

      Hello Serge,

      Sorry for poor explanation, Actually i want to make custom widget which works exactly same like expression. but I don't want to use expression type as my requirement is to change the type of my custom widgets from expression to myCustomExpressionType. Is that possible to do so ? I hope I could able to explain you my requirement.

      Thanks,
      HIren

      Answers

      created 5 years ago

      Hello,

      As you can see from this live sample - https://plnkr.co/edit/HdnYE5?p=preview
      the custom widget in the sample has the "textwithbutton" name and this name is used in survey JSON.
      You can change this name according to your requirements - "myCustomExpressionType".

      Here is the live plunker - https://plnkr.co/edit/TP1qYEhewptxp0wgJsRV?p=preview of the expression based custom widget

      Thanks, Serge
      SurveyJS Team