How to stop/pause/override Dojo confirmDialog hiding execution?

I have Dojo confirmaDialog and I need to implement a simple validation before submitting the form and to prevent modal from closing in case if there are validation errors.

This is what I have right now:

var followUpDialog = new ConfirmDialog({
    title: "Create new follow-up",
    content: handleMessageContent(),
    style: "width: 730px",
    onShow: function() {
        modalContainer = this.containerNode;
        fillInputFields(modalContainer);
    },
    onExecute: function () {
        if(!this.get("state")) {
            handleSubmit();
        } else {
            // Need something like event.preventDefault here.
        }

    },
    onCancel: function () {
        //Do nothing...
    }
});

Basically I need to somehow do nothing on certain condition when submit button is pressed.

149 thoughts on “How to stop/pause/override Dojo confirmDialog hiding execution?”

  1. I’d like to thank you for the efforts you’ve put in penning this blog.
    I’m hoping to view the same high-grade blog posts from you later
    on as well. In truth, your creative writing abilities has inspired me to get my own website
    now 😉

    Reply
  2. I have been browsing online more than 4 hours today, yet I never found any interesting article like yours.
    It’s pretty worth enough for me. Personally,
    if all web owners and bloggers made good content as you did,
    the web will be a lot more useful than ever before.

    Reply
  3. I’ll right away grab your rss as I can not to find your email subscription link or newsletter service.
    Do you’ve any? Kindly let me recognise so that I may just subscribe.
    Thanks.

    Reply
  4. I’m extremely impressed together with
    your writing skills and also with the structure to your blog.
    Is this a paid subject or did you modify it your self?
    Either way stay up the nice high quality writing, it’s uncommon to see a great weblog like this
    one these days..

    Reply
  5. I’m really impressed with your writing skills and also with the layout on your weblog.
    Is this a paid theme or did you customize it yourself? Either
    way keep up the nice quality writing, it is rare to see a great blog like this one today.

    Reply
  6. It’s appropriate time to make some plans for the future and
    it’s time to be happy. I have read this post and if
    I could I desire to suggest you few interesting things or advice.

    Maybe you could write next articles referring to this article.

    I wish to read even more things about it!

    Reply
  7. I’ve been browsing online more than 4 hours today, yet I never found any
    interesting article like yours. It is pretty worth enough for me.

    In my opinion, if all web owners and bloggers made good content as
    you did, the web will be a lot more useful than ever before.

    Reply
  8. Woah! I’m really enjoying the template/theme of this site.
    It’s simple, yet effective. A lot of times it’s tough to get
    that “perfect balance” between usability and visual appeal.
    I must say you have done a fantastic job with this.
    Additionally, the blog loads very quick for me on Firefox.
    Exceptional Blog!

    Reply
  9. Wonderful article! That is the type of information that are supposed to be shared around the internet.
    Disgrace on the search engines for not positioning this post higher!
    Come on over and seek advice from my website . Thank you =)

    Reply
  10. Thanks so much for providing individuals with remarkably superb opportunity to discover important secrets from this website. It can be so terrific and as well , stuffed with a great time for me and my office mates to visit your web site on the least thrice in a week to see the latest items you have got. And indeed, I’m usually happy with all the eye-popping guidelines you give. Certain 1 facts on this page are indeed the very best I have ever had.

    Reply
  11. Its like you read my thoughts! You appear to know a lot about this, such as you wrote
    the ebook in it or something. I think that you
    could do with a few % to pressure the message home a little bit, but instead of
    that, that is fantastic blog. A great read.
    I’ll certainly be back.

    Reply
  12. Howdy, i read your blog occasionally and i own a similar one and i was just wondering if you
    get a lot of spam feedback? If so how do you reduce it, any plugin or anything you can advise?

    I get so much lately it’s driving me insane so any assistance is
    very much appreciated.

    Reply
  13. You actually make it appear really easy together with your presentation but I in finding this topic
    to be really one thing that I believe I’d by no means
    understand. It seems too complex and extremely huge for me.
    I’m having a look forward to your next submit, I will attempt to get the
    cling of it!

    Reply
  14. It’s appropriate time to make some plans for the future and it is time to be happy.
    I’ve read this post and if I could I wish to suggest you few interesting things or tips.
    Maybe you could write next articles referring to this article.
    I desire to read even more things about it!

    Reply