Skip to content

This sample Kintone plug-in copies the value from a number field into a text field, and then fills the beginning of the text field with zeros until the text field reaches the specified number of digits.

License

kintone-samples/SAMPLE-Zero-fill-number-plug-in

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

[Sample plug-in: Zero fill number Plug-in]

Purpose of the Sample Plug-in

This sample plug-in is available for educational purposes.
Use this plug-in to understand how Kintone plug-ins work, and how they are structured. A non-packaged version written with a single JavaScript file can be found here https://kintone.dev/en/tutorials/autofill-data/add-leading-zeros-to-numbers/

What the plug-in does

This plug-in sample zero-fills a number, and sets it into a text field.

Plug-in directory structure

This sample plug-in is created with the following directory structure.

src/
├── html/
│        └──── config.html
├── css/
│        ├──── 51-modern-default.css
│        └──── config.css
├── js/
│        ├──── config.js
│        └──── desktop.js
├── image/
│        └──── abacus.png
└── manifest.json

How to use

To simply test out the plug-in on your Kintone domain, follow these steps:

  1. Download the plug-in zip file
    Reference: https://github.com/kintone/SAMPLE-Date-input-button-Plug-in/releases
  2. Install the plug-in into your domain
    Reference: https://get.kintone.help/hc/en-us/articles/115001519707-Installing-Viewing-Plug-ins
  3. Add the plug-in to a specific Kintone App
    Reference: https://get.kintone.help/hc/en-us/articles/115001511188-Adding-Plug-ins-to-an-App
  4. Make sure that a number field and text field are placed into the form of an App.
  5. From the plug-in settings, set the number and text fields, as well as the number of digits you'd like the zero-filled number to have.
  6. Create a new record and enter in a number into the number field. The text field will reflect the same number with zeros filled into the beginning to make the number the designated number of digits.

How to modify

  1. Fork to your repo
  2. Make changes to files under /src
  3. Repackage the plug-in by:
    i. Zipping the manifest.json file, css directory, html directory, image directory and js directory into one zip file.
    ii. Drag and dropping the file into the kintone plug-in packer.

Pull Request Policy

As this repo exists for educational purposes, we will most likely turn down pull requests that contain updates with new features.
Please feel free to host plug-ins with new features on your own repository.
Bug fixes are happily accepted.

About

This sample Kintone plug-in copies the value from a number field into a text field, and then fills the beginning of the text field with zeros until the text field reaches the specified number of digits.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published