Copied to clipboard

Flag this post as spam?

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


  • Joey Ireland 5 posts 73 karma points
    Aug 28, 2023 @ 17:19
    Joey Ireland
    0

    Creating a contact form via controller - Error 400 on submit

    Hi all I have followed this documentation to the final detail for creating a submit form using controllers but when I hit the submit button it goes to error 400 and when running in debug it does not even get to the function submit().

    is there anything I need to do to rebuild or anything ?

    the documentation is located on this link: Creating Forms - Umbraco CMS

  • Huw Reddick 1821 posts 6256 karma points MVP 2x c-trib
    Aug 29, 2023 @ 12:49
    Huw Reddick
    0

    Instead of defining the form (as per the docs) using nameof(ContactFormController.Submit) for the action, just use the string "Submit" I have know the nameof() to cause issues.

    so decalare like

    @using (Html.BeginUmbracoForm<ContactFormController>("Submit"))
    
Please Sign in or register to post replies

Write your reply to:

Draft