Copied to clipboard

Flag this post as spam?

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


  • Dan Mothersole 22 posts 109 karma points
    Jun 20, 2013 @ 11:13
    Dan Mothersole
    0

    Setting form class with @Html.BeginUmbracoForm

    Hi,

    I have created a login form on my page and have used the BeginUmbracoForm to create this form and use cutom inputs within.

    Want I would like to do is to set the class of the form that is created via the BeginUmbracoForm, is this possible or do I have to manualy create the form (I have attempted this  but I get an error so have gone back to BeginUmbracoForm).

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jun 20, 2013 @ 12:35
    Jeroen Breuer
    100

    Hello,

    You can set the class like this:

    @using (Html.BeginUmbracoForm("SendContact", "Form", null, new { @class = "form valid" }))

    This is the html it will render:

    <form action="http://localhost/contact/" class="form valid" enctype="multipart/form-data" method="post">

    Jeroen

  • Dan Mothersole 22 posts 109 karma points
    Jun 20, 2013 @ 14:51
    Dan Mothersole
    0

    Thank you, all good now.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jun 20, 2013 @ 15:51
    Jeroen Breuer
    0

    Glad I could help. Can you please mark the post as the solution if it helped you.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft