Question T4037
Visible to All Users

How to set a value to a custom property?

created 5 years ago (modified 5 years ago)

[Ticket cloned from T3216: Add property]

Hello Team!!

How to set value of custom properties?

On 2/27/2020 3:37 PM, Support Support wrote:

Answers approved by surveyjs Support

created 5 years ago

Hello,

Custom property is added on the library level and it value can be set via JSON:

JavaScript
Survey     .Serializer     .addProperty("question", {         name"tag:number",         default0,         category"general"     }); var json = {{ "pages": [ { "name": "page1", "elements": [ { "type": "text", "name": "question1", "tag": 1 } ] } ] }; var survey = new Survey.Model(json);

Here is the working sample with SurveyJS Creator - https://plnkr.co/edit/eTtuSbk0cN5XwJKI

Thanks, Serge
SurveyJS Team

    Show previous comments (1)

      Hello,

      Sorry, but I don't understand you.

      Thanks, Serge
      SurveyJS Team

        How do I  call the function of remove question  button on the surveyj,
        what is the function call?

        On 5/27/2020 11:16 AM, Serge T [surveyjs Support] wrote:

          Hello,

          I've created a separate ticket on your behalf (T4192: How do I call the function of remove question button on the surveyj, what is the function call?). It has been placed in our processing queue and will be answered shortly.

          Thanks, Serge
          SurveyJS Team