How to add multiple check boxes on Doctype

I have a doctype that, on paper, I need to record if certain values apply to it, like for example, each record needs to indicate if it has all or some of the following properties:

(Alloy Wheels, Sunroof, Spare Wheel, etc)

These values are predefined, I Just need users to tick/check the ones that apply. Like how selecting Modules in Module Profile doctype works:

How can I do this.

Each one of the options need a “Check” field on Doctype, you can distribute them on columns with “Column Break”. You can even hide/unhide this checks depending on the value of other fields using “Display Depends On”.

Hope this helps.

I need the checks to be dynamic, say I have a tuple/list with the values which can be updated. I don’t think this approach will work?

Hi:

Sorry, maybe I don’t understand your requirements …

What the mean of “dynamic” here? Each check field should be showed or not showed depending of the value of other field (car model, or something like this)?

Please, detail a little bit more the use case.

User one is custom code. It’s “low level API” and not available as docfield type directly.

MultiCheck is the field type. It’s not available on doctype schemas directly.

https://frappeframework.com/docs/v14/user/en/api/controls

At present you’re better off adding checkbox for each field you want. Cause multicheck is only useful when that list dynamically changes.

2 Likes