Form. How to display a tree with a selection of checkboxes

Demo stand of this feature - /tst-form-treeview

Select the field type Tree with checkboxes (treeCheckboxes). 

Specify the tree in the dict procedure as a list Value, Value2 (здесь будет parentID), Text

CREATE PROCEDURE [dbo].[fm_tst-form-treeview_f1_dict]
   @username nvarchar(256),
   @itemID nvarchar(128)
	select Value,     -- id as Text,
		isnull(c.parentID, 0) Value2  -- parentID
    from tst_categories c

In the getItem procedure, you must pass the currently selected checkboxes separated by commas.

CREATE PROCEDURE [dbo].[fm_tst-form-treeview_getItem]
    @itemID int,
	@username nvarchar(256)

      STUFF((SELECT ',' + cast(id as nvarchar)
      FROM tst_categories
      WHERE selected=1
      FOR XML PATH('')), 1, 1,'') f1  -- selected categories

In the saveItem procedure, we save the tick values (they come as selected values separated by commas).

CREATE PROCEDURE [dbo].[fm_tst-form-treeview_saveItem]
   @username nvarchar(256),
   @itemID int,
   @parameters ExtendedDictionaryParameter READONLY

	declare @pf1 nvarchar(max)
	select @pf1 = Value2 from @parameters where [key]='f1'

    exec as_print @str = @pf1

    update tst_categories
    set selected= 0

    update tst_categories
    set selected= 1
    where id in (select Value from dbo.split(@pf1,',') where Value<>'')

    -- SELECT 1 (Result, Msg, SuccessUrl, HideFormAfterSubmit, RefreshContainer)
	select 1 Result, 'OK' Msg, '' SuccessUrl, 0 HideFormAfterSubmit, '' RefreshContainer
Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started

SQL-tool for creating personal accounts on the site

The essence of the approach and the history of the creation of Falcon Space
Web platform for creating personal accounts

Falcon Space Platform

This is a reduction in the cost of ownership

at the expense of fewer people to support

This is a quick change

while using the program

This is a modern interface

full adaptation for mobile devices

MS SQL web applications. Affiliate program for developers and web studios

You can develop on your own or collaborate with us on Falcon Space web development using only SQL and HTML.
See examples with SQL code
Platform documentation
Working on MS SQL Server