Announcement

As of April 17, 2018, this site is now in read-only mode. To start new Blackbaud Developer’s discussions, you will find Developer Discussions in the Blackbaud CRM Community.

To post or respond to Blackbaud Community discussions, you will have to login using a www.blackbaud.com login. Learn how to login here. If you have questions or need assistance, please email community@blackbaud.com.

1.7k questions

3.2k answers

401 users

Categories

1.7k questions

3.2k answers

401 users

I have a custom UI form where users can add/edit addresses, phones, emails for a specific constituent. When the user clicks OK on the form the following javascript function is called:

(function (container, modelInstanceId) {
var Util = BBUI.forms.Utility;

container.on("FormConfirmed", function (args) {

container.invokeAction(modelInstanceId, "FORMCONFIRMED");

});

})();

once the action is invoked the form gets closed. I would like to use javascript validation and alert the user to any data entry errors and keep the form open. However just testing this idea by putting in an alert and commenting out the invokeAction code doesn't prevent the form from being closed.

 (function (container, modelInstanceId) {
var Util = BBUI.forms.Utility;

container.on("FormConfirmed", function (args) {

alert("Hello World");

//container.invokeAction(modelInstanceId, "FORMCONFIRMED");

}); })();

Even though I've commented out the InvokeAction method the form still gets closed once you click OK on the alert dialog. Why? How can I keep the form open. Thanks for your help

asked by maratg (173 points)
edited by maratg

Please log in or register to answer this question.

...