Copied to clipboard

Flag this post as spam?

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


  • lori ryan 239 posts 573 karma points
    Nov 28, 2019 @ 15:46
    lori ryan
    0

    formulate 2.4.8 on Umbraco version 7.15.3.

    Hi

    Ive installed formulate 2.4.8 on Umbraco version 7.15.3. No ssl and its happening on desktop and mobile versions.

    I have configured a form, handler and layout.

    Ive copied the render form from http://www.formulate.rocks/render-form

    The form renders fine.

    However on submission I get the following error http://xxxxx.com/umbraco/formulate/submissions/submit 500 (Internal Server Error) on angular.js

    When I look at the logs I see System.Web.Mvc.HttpAntiForgeryException (0x80004005): The required anti-forgery cookie "__RequestVerificationToken" is not present.

    Any help to resolve would be much appreciated?

    Also how can I add a class to the form tag?

  • lori ryan 239 posts 573 karma points
    Nov 28, 2019 @ 16:17
    lori ryan
    0

    I added the @Html.AntiForgeryToken() it seems to have worked.

    how can I add a class to the form tag?

  • Nicholas Westby 2054 posts 7104 karma points c-trib
    Dec 02, 2019 @ 17:57
    Nicholas Westby
    0

    Hi Lori,

    The anti-forgery token should already be included in the form. Which template are you using (e.g., AngularJS, plain JavaScript, or a custom one of your own making)?

    The answer to that question may help to answer your other question regarding adding a CSS class to the form tag. If you are using the plain JavaScript (which I would recommend over the AngularJS one), I would guess you can add that with a bit of custom JavaScript. Something like this:

    document.querySelectorAll("form.formulate__form")
        .forEach(x => x.classList.add("some-class"));
    

    That depends a bit on your needs.

  • 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