Copied to clipboard

Flag this post as spam?

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


  • Matt Taylor 873 posts 2086 karma points
    Jul 04, 2014 @ 11:35
    Matt Taylor
    0

    Creating forms the mvc way that post back to TC

    How do I convert

    <form action="/base/TC/FormPost.aspx" method="post">

    into

    @using (Html.BeginUmbracoForm("action", "controller"))

    for use with an MVC view?

    What do I need to put for the action and controller params?

    Regards,

    Matt

  • Anders Burla 2560 posts 8256 karma points
    Jul 04, 2014 @ 12:12
    Anders Burla
    0

    Hi Matt

    You should not change these forms into MVC forms. So just use them as normal.

  • Matt Taylor 873 posts 2086 karma points
    Jul 04, 2014 @ 12:27
    Matt Taylor
    0

    I probably should have said why I wanted to do it.

    I'm using the jquery.validate and MVC jquery.validate.unobtrusive libraries to provide validation for my other forms so I wanted to do do the same with the Tea Commerce forms.

    If I keep them as they are I'll have to do something extra.

  • Anders Burla 2560 posts 8256 karma points
    Jul 07, 2014 @ 09:30
    Anders Burla
    100

    If you want to do this you will have to do your own implementation of the form handler in Tea Commerce. You make your own controllers and then in the C# code you just use the TeaCommerce handler to TeaCommerceHelper class that is in the TeaCommerce.Api.Web dll. But if you need to implement the entire HTML form API you have quite a job to do :)

    Kind regards
    Anders

  • Matt Taylor 873 posts 2086 karma points
    Jul 07, 2014 @ 11:36
    Matt Taylor
    0

    Ah yes, creating a middle-man class is a good solution. :-)

Please Sign in or register to post replies

Write your reply to:

Draft