How to make a confirmation window for the form action

Example of how the form works:

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 и т.д.)
	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

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

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

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

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