Limit User Selection Fields to 1 User
Contents
Overview
This article introduces how to limit the User selection field to hold only one value.
By default, User selection fields in Kintone can hold information of multiple users. The number of users that can be selected for the value cannot be controlled with Kintone's built-in features.
Sample Image
The only field needed for this customization to run is the User selection field.
Prepare the App
Create an App
with the following fields and settings.
Field Type | Field Name | Field Code |
---|---|---|
User selection | The person in charge | userfield |
Sample Code
Prepare the following JavaScript code in a text editor and navigate to the Kintone App's settings. Upload the file into the Upload JavaScript for PC option of the
JavaScript and CSS Customization settings
.
|
|
Navigate to the Record Create page, Record Edit page or the Record List page. Add 2 or more users to the User selection field and click on Save. The record should be unsaved, and an error message should appear.