Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gal Nitzan 50 posts 164 karma points
    May 16, 2015 @ 21:02
    Gal Nitzan
    0

    How to prevent formSubmitting in custom property editor

    Hi,

    I would like to prevent the user from submitting the value when the value is not correct.

    I tried to return false and I also tried e.preventDefault() but its not working.

    Help any one?

    Thanks,

    Gal.

  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    May 16, 2015 @ 21:04
    Alex Skrypnyk
    0

    Hi Gal,

    Where are you showing your form? In the admin part ?

    Can you share code ?

    Thanks, Alex

  • Gal Nitzan 50 posts 164 karma points
    May 16, 2015 @ 23:05
    Gal Nitzan
    101

    Hi Alex,

    yes in the admin

    $scope.$on("formSubmitting", function (e, args) {
    if ($scope.counter > 3) {
        e.preventDefault();
    }
    
    
    $scope.currentPage.tabs[1].properties[9].value = $scope.model.specials;
    

    });

  • Gal Nitzan 50 posts 164 karma points
    May 21, 2015 @ 21:38
    Gal Nitzan
    0

    Actually, was not solved pressed by mistake. If any one can lead me to the right track, would be appreciated.

    Gal.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    May 22, 2015 @ 12:02
    Dave Woestenborghs
    0

    Hi Gal,

    I had found a solution to hook in to the unpublish button.

    You can see it in this post.

    https://our.umbraco.org/forum/umbraco-7/developing-umbraco-7-packages/64709-Intercepting-unpublish-button-click-

    Dave

  • Gal Nitzan 50 posts 164 karma points
    May 23, 2015 @ 01:15
    Gal Nitzan
    0

    Hi Dave and thank you!!! Exactly what I needed.

    BR,

    Gal

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies