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 58 posts 241 karma points
    14 days ago
    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 58 posts 241 karma points
    14 days ago
    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 1906 posts 6364 karma points c-trib
    1 week ago
    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.

Please Sign in or register to post replies

Write your reply to:

Draft