Home
Softono
custom-widgets

custom-widgets

Open source MIT JavaScript
88
Stars
81
Forks
29
Issues
7
Watchers
6 days
Last Commit

About custom-widgets

# Custom Widgets for SurveyJS > **IMPORTANT**: Using a custom widget is no longer the recommended approach to customizing SurveyJS forms. For current best practices and available options, refer to the following help topic: [Question Customization Options](https://surveyjs.io/form-library/documentation/customize-question-types/question-customization-options). [![Build.Node.js CI](https://github.com/surveyjs/custom-widgets/actions/workflows/build.node.js.yml/badge.svg)](https://github.com/surveyjs/custom-widgets/actions/workflows/build.node.js.yml) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE) - select2: [site](https://select2.org/), [repo](https://github.com/select2/select2), license: MIT - select2tagbox: [site](https://select2.org/), [repo](https://github.com/select2/select2), license: MIT - icheck: [site](http://icheck.fronteed.com/), [repo](https://github.com/fronteed/iCheck/), license: MIT - inputmask: [site](http://robinherbots.github.io/Inputma ...

Platforms

Web Self-hosted

Languages

JavaScript

Custom Widgets for SurveyJS

IMPORTANT: Using a custom widget is no longer the recommended approach to customizing SurveyJS forms. For current best practices and available options, refer to the following help topic: Question Customization Options.

Build.Node.js CI

Software License

Getting started

es5 examples: https://surveyjs.io/Examples/Library/?id=custom-widget-select2-tagbox
es modules examples: https://stackblitz.com/edit/surveyjs-widgets-react

Install the library using es5.

<script src="https://unpkg.com/surveyjs-widgets"></script>

Install the library using npm.

npm install surveyjs-widgets

Or use unpkg CDN: https://unpkg.com/surveyjs-widgets@{version-number}/surveyjs-widgets.min.js

You find all versions/builds in the surveyjs/build repo.

Building surveyjs-widgets from sources

To build library yourself:

  1. Clone the repo from GitHub

    git clone https://github.com/surveyjs/widgets.git
    cd surveyjs-widgets
  2. Acquire build dependencies. Make sure you have Node.js installed on your workstation. This is only needed to build surveyjs from sources.

    npm install
  3. Build the library

    npm run build

    After that you should have the libraries (angular, jquery, knockout, react and vue) at 'packages' directory.

  4. Add your own custom widget

    Please go to this plunker and select customwidget.js to review the code and comments.

    The same plunker example, but for Survey Creator / Form Builder

License

MIT license