Copied to clipboard

Flag this post as spam?

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


  • Robert Baran 2 posts 72 karma points
    Feb 04, 2021 @ 07:18
    Robert Baran
    0

    How to add HTML form and CSS to a page?

    I have an HTML form and some CSS I created for it. What's the easiest way to add it to a page?

    BTW I'm doing this for a client and have never used this platform, I work in WordPress all the time though. Would appreciate basic instructions for a Umbraco newbie.

    Tried searching docs but still couldn't figure it out :(

  • Nik 1591 posts 7148 karma points MVP 6x c-trib
    Feb 04, 2021 @ 07:57
    Nik
    0

    Hi Robert,

    In order to achieve this you will either want to purchase Umbraco Forms (Which is a paid for plugin) or you will need to know some C#/Razor.

    As a WordPress developer I assume your programming language knowledge is PHP based rather than C#/Razor as such the easiest approach for you would probably be to use Umbraco Forms.

    But if you are interested in learning the C#/Razor approach then you could look into this video tutorial: https://codeshare.co.uk/blog/how-to-create-a-contact-form-in-umbraco-using-mvc-and-c/, it is for Umbraco 7, but a lot of the concepts are the same for v8 as well.

    Nik

  • Robert Baran 2 posts 72 karma points
    Feb 04, 2021 @ 19:32
    Robert Baran
    0

    The client has Umbraco Forms already. But if I understand right that plugin lets you create the forms using the form builder. I already have the complete form in HTML version, it has the submit button and submit action. It's a complete HTML form from start to finish.

    I'm hoping for a more direct solution of simply adding the HTML code in the right section on a page. Is that an option?

  • Steve Morgan 1345 posts 4452 karma points c-trib
    Feb 05, 2021 @ 16:57
    Steve Morgan
    0

    You can add the html to a view or a partial view no problem.

    What is handling the action of the form post - is this posting somewhere externally or do you need to handle it?

    In a PHP world you'd create a controller to handle the form post - right? When in Umbraco you're probably looking at a Surface Controller. This will require you to write and compile some code if that's what you need.

    HTH Steve

Please Sign in or register to post replies

Write your reply to:

Draft