How to make a confirmation window for the form action

Example of how the form works: https://demo.web-automation.ru/list/watch/forma-s-proverkoy-i-podtverzhdeniem-deysvtiya--confirm---27

We specify the Confirm - JSON field with the text, title, btnText, confirmCode, system (bit) fields in saveItem SELECT 1. If it is set, the operation confirmation window is displayed. 

When confirming an action, an additional Value2 field is passed to @parameters Key=confirmCode. We use it to determine what the user has confirmed and perform the action.

Example SaveItem: 

CREATE PROCEDURE [dbo].[fm_watch_formConfirm_saveItem]
   @username nvarchar(256),
   @itemID int,
   @parameters ExtendedDictionaryParameter readonly
   -- it is necessary to list all the fields in the form (@fieldcode и т.д.)
AS
BEGIN
	declare @confirmCode nvarchar(128)
    select @confirmCode = Value2 from @parameters where [Key]='confirmCode'

	declare @check bit = 0   -- если 0 то значит выдаем окно подверждения действия
    if(@check = 0 and isnull(@confirmCode, '')='') begin
    	select 1 Result, ' Проверка... ' Msg, '{"title" : "title 1", "text": "Some confirm text", "btnText": "Go!", "confirmCode":"code1", "system": false }' Confirm
        return
    end

    if(@confirmCode = 'code1') begin
    	select 1 Result, 'Saved by confirmation '+ @confirmCode Msg
    end



	-- 1 SELECT (Result, Msg)
	select 1 Result, 'Saved' Msg
END

If system = true, the system confirm will be used, and not the dialog box. This is relevant for the case of a modal form (otherwise, confirm will simply close the main form).

Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started
{sp-shortDemostandLinks}

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
Note