Skip to main content
Question

dialog box?

  • May 23, 2018
  • 0 replies
  • 127 views

Can I get dialog box displayed when I click save button of the Form. and the dialog box should contain 
  •  "Confirm" button  
  • "cancel" Button
  • updated Fields in the Dialogbox
This topic has been closed for replies.

  • Quickbase Alumni
  • May 23, 2018
Howdy Vivek,

The following link should help you out.  You will have to slightly modify the code to apply to the save button, instead of the delete button.  Shouldn't be too difficult. 

https://community.quickbase.com/quickbase/topics/is-there-a-way-to-make-it-harder-to-delete-a-record...

Scott

  • Quickbase Alumni
  • May 27, 2018
Here is a demo:






Confirm Changes Before Save ~ Edit Record 1
https://haversineconsulting.quickbase.com/db/bnqqxfsbz?a=er&rid=1

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=656

Notes:

(1) This demo combines several scripting concepts that may make it look complex but in reality each of these ideas has been presented in prior examples. The demo was test in Chrome but should work in all modern browsers.

(2) The demo saves the original click handler for the Save button and otherwise intercepts the click event. If the user wants to save the record after being presented with a dialog box displaying a summary of the changes, the original click handler is invoked. In the high-stakes world of customizing low code applications such as QuickBase with script this is the preferred way to alter the behavior of the Save button as it does not alter QuickBase's code.

(3) The demo build a data structure of all <input> fields whose value has changed since the form was first opened.

(4) An Underscore template was used to build the miniature <table> displayed in the dialog box. This template can be modified and styled as desired. 

(5) The dialog box was built using jQueryUI's dialog method and its appearance and functionality can easily be adopted by changing various configuration parameters.

  • Quickbase Alumni
  • May 30, 2018
I have tested the code and for me it is only showing one field (#39) as changed. I can change all other fields and leave 39 alone and the box pops up with no data. Is there a change to be made and I am missing it?

  • Quickbase Alumni
  • June 14, 2018
See this much more extensive demo (eight examples) of using Dialog Boxes:

How To Dialog?
https://www.youtube.com/watch?v=C4lQWQ_QGZM

  • Author
  • Quickbase Alumni
  • September 17, 2018

Hi, it's working fine in Crome, but not in IE browser?