How to use survey-angular - 10 common examples

To help you get started, we’ve selected a few survey-angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github surveyjs / surveyjs_angular_cli / src / app / survey.component.ts View on Github external
widgets.select2(Survey);
widgets.inputmask(Survey);
widgets.jquerybarrating(Survey);
widgets.jqueryuidatepicker(Survey);
widgets.nouislider(Survey);
widgets.select2tagbox(Survey);
widgets.signaturepad(Survey);
widgets.sortablejs(Survey);
widgets.ckeditor(Survey);
widgets.autocomplete(Survey);
widgets.bootstrapslider(Survey);
widgets.prettycheckbox(Survey);
//widgets.emotionsratings(Survey);

Survey.JsonObject.metaData.addProperty('questionbase', 'popupdescription:text');
Survey.JsonObject.metaData.addProperty('page', 'popupdescription:text');

Survey.StylesManager.applyTheme("default");

@Component({
  // tslint:disable-next-line:component-selector
  selector: 'survey',
  template: `<div class="survey-container contentcontainer codecontainer"><div id="surveyElement"></div><button>Save PDF</button></div>`
})
export class SurveyComponent implements OnInit {
  @Output() submitSurvey = new EventEmitter();
  @Input()
  json: object;
  result: any;

  ngOnInit() {
    const surveyModel = new Survey.Model(this.json);
github surveyjs / surveyjs_angular_cli / src / app / survey.component.ts View on Github external
widgets.icheck(Survey);
widgets.select2(Survey);
widgets.inputmask(Survey);
widgets.jquerybarrating(Survey);
widgets.jqueryuidatepicker(Survey);
widgets.nouislider(Survey);
widgets.select2tagbox(Survey);
widgets.signaturepad(Survey);
widgets.sortablejs(Survey);
widgets.ckeditor(Survey);
widgets.autocomplete(Survey);
widgets.bootstrapslider(Survey);
widgets.prettycheckbox(Survey);
//widgets.emotionsratings(Survey);

Survey.JsonObject.metaData.addProperty('questionbase', 'popupdescription:text');
Survey.JsonObject.metaData.addProperty('page', 'popupdescription:text');

Survey.StylesManager.applyTheme("default");

@Component({
  // tslint:disable-next-line:component-selector
  selector: 'survey',
  template: `<div class="survey-container contentcontainer codecontainer"><div id="surveyElement"></div><button>Save PDF</button></div>`
})
export class SurveyComponent implements OnInit {
  @Output() submitSurvey = new EventEmitter();
  @Input()
  json: object;
  result: any;

  ngOnInit() {
github surveyjs / surveyjs_angular_cli / src / app / survey.component.ts View on Github external
// showDescription(question);
        alert(options.question.popupdescription);
      };
      const header = options.htmlElement.querySelector('h5');
      const span = document.createElement('span');
      span.innerHTML = '  ';
      header.appendChild(span);
      header.appendChild(btn);
    });
    surveyModel.onComplete
      .add((result, options) => {
        this.submitSurvey.emit(result.data);
        this.result = result.data;
      }
      );
    Survey.SurveyNG.render('surveyElement', { model: surveyModel });
  }
  savePDF() {
github surveyjs / surveyjs_angular_cli / src / app / survey.component.ts View on Github external
ngOnInit() {
    const surveyModel = new Survey.Model(this.json);
    surveyModel.onAfterRenderQuestion.add((survey, options) => {
      if (!options.question.popupdescription) { return; }
      // Add a button;
      const btn = document.createElement('button');
      btn.className = 'btn btn-info btn-xs';
      btn.innerHTML = 'More Info';
      btn.onclick = function () {
        // showDescription(question);
        alert(options.question.popupdescription);
      };
      const header = options.htmlElement.querySelector('h5');
      const span = document.createElement('span');
      span.innerHTML = '  ';
      header.appendChild(span);
      header.appendChild(btn);
    });
github surveyjs / surveyjs_angular_cli / src / app / survey.component.ts View on Github external
widgets.jquerybarrating(Survey);
widgets.jqueryuidatepicker(Survey);
widgets.nouislider(Survey);
widgets.select2tagbox(Survey);
widgets.signaturepad(Survey);
widgets.sortablejs(Survey);
widgets.ckeditor(Survey);
widgets.autocomplete(Survey);
widgets.bootstrapslider(Survey);
widgets.prettycheckbox(Survey);
//widgets.emotionsratings(Survey);

Survey.JsonObject.metaData.addProperty('questionbase', 'popupdescription:text');
Survey.JsonObject.metaData.addProperty('page', 'popupdescription:text');

Survey.StylesManager.applyTheme("default");

@Component({
  // tslint:disable-next-line:component-selector
  selector: 'survey',
  template: `<div class="survey-container contentcontainer codecontainer"><div id="surveyElement"></div><button>Save PDF</button></div>`
})
export class SurveyComponent implements OnInit {
  @Output() submitSurvey = new EventEmitter();
  @Input()
  json: object;
  result: any;

  ngOnInit() {
    const surveyModel = new Survey.Model(this.json);
    surveyModel.onAfterRenderQuestion.add((survey, options) =&gt; {
      if (!options.question.popupdescription) { return; }
github abritopach / ionic-surveyjs / src / components / survey / survey.ts View on Github external
@Input() set survey(survey) {
        Survey.Survey.cssType = "bootstrap";
        Survey.defaultBootstrapCss.navigationButton = "btn btn-green";

        this._survey = survey;
        let surveyModel = new Survey.ReactSurveyModel({ surveyId: this._survey.Id });

        // Change language.
        surveyModel.locale = "es";

        // Progress Bar.
        surveyModel.showProgressBar = 'bottom';

        surveyModel.onComplete.add(this.sendDataToServer.bind(this));
        Survey.SurveyNG.render('surveyElement', { model: surveyModel });

    }
github abritopach / ionic-surveyjs / src / components / survey / survey.ts View on Github external
@Input() set survey(survey) {
        Survey.Survey.cssType = "bootstrap";
        Survey.defaultBootstrapCss.navigationButton = "btn btn-green";

        this._survey = survey;
        let surveyModel = new Survey.ReactSurveyModel({ surveyId: this._survey.Id });

        // Change language.
        surveyModel.locale = "es";

        // Progress Bar.
        surveyModel.showProgressBar = 'bottom';

        surveyModel.onComplete.add(this.sendDataToServer.bind(this));
        Survey.SurveyNG.render('surveyElement', { model: surveyModel });

    }
github abritopach / ionic-surveyjs / src / components / survey / survey.ts View on Github external
@Input() set survey(survey) {
        Survey.Survey.cssType = "bootstrap";
        Survey.defaultBootstrapCss.navigationButton = "btn btn-green";

        this._survey = survey;
        let surveyModel = new Survey.ReactSurveyModel({ surveyId: this._survey.Id });

        // Change language.
        surveyModel.locale = "es";

        // Progress Bar.
        surveyModel.showProgressBar = 'bottom';

        surveyModel.onComplete.add(this.sendDataToServer.bind(this));
        Survey.SurveyNG.render('surveyElement', { model: surveyModel });

    }
github surveyjs / surveyjs_angular_cli / src / app / survey.analytics.component.ts View on Github external
type: "comment",
              name: "favorite_functionality",
              title: "What's your favorite functionality / add-on?"
            },
            {
              type: "comment",
              name: "product_improvement",
              title:
                "How could our products be improved to better meet your needs?"
            }
          ]
        }
      ]
    };

    var survey = new Survey.SurveyModel(json);

    // survey results data object
    var firstResult = {
      organization_type: "In-house",
      developer_count: "1",
      VerticalMarket: "Education",
      product_discovering: "GitHub",
      javascript_frameworks: ["jQuery"],
      backend_language: ["Ruby"],
      useproduct: "Yes",
      uselibraries: ["Survey Library (Runner)"],
      product_new: ["Export to PDF (survey and its result)"],
      supported_devices: ["Desktop", "Tablete", "Mobile"],
      native_mobile_support: "2",
      product_alternative: "Develop ourselves",
      product_recommend: "Yes",
github abritopach / ionic-surveyjs / src / components / survey / survey.ts View on Github external
@Input() set survey(survey) {
        Survey.Survey.cssType = "bootstrap";
        Survey.defaultBootstrapCss.navigationButton = "btn btn-green";

        this._survey = survey;
        let surveyModel = new Survey.ReactSurveyModel({ surveyId: this._survey.Id });

        // Change language.
        surveyModel.locale = "es";

        // Progress Bar.
        surveyModel.showProgressBar = 'bottom';

        surveyModel.onComplete.add(this.sendDataToServer.bind(this));
        Survey.SurveyNG.render('surveyElement', { model: surveyModel });

    }

survey-angular

survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.

MIT
Latest version published 5 days ago

Package Health Score

93 / 100
Full package analysis