Copied to clipboard

Flag this post as spam?

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


  • Philip Brookes 4 posts 24 karma points
    Feb 19, 2010 @ 00:15
    Philip Brookes
    0

    Anybody got an example of how to insert a Contour form into a content page?

    I've not yet been able to locate any examples of how the Contour forms are called in a content page. I've heard a few mentions of calling it from a template instead of from the content page - is this essential?

    I know that I can Insert Macro > Insert Form from Contour, but when I do that directly into one of my pages, it shows up in the editor but not in preview or the front end. So I thought I'd look at the code that had been generated - however, I don't know what it's supposed to look like.

    The code that was inserted by the macro looks like this:

    <div class="umbMacroHolder" title="This is rendered content from macro" umbpageid="2061" umbversionid="84f79da2-dbab-4347-96ee-30519bf006d2" onresizestart="return false;" ismacro="true" umb_formguid="9b366fee-1c4f-4cf1-9455-f20b9bee090c" umb_macroalias="umbracoContour.RenderForm"><!-- startUmbMacro -->
    <div id="contour">
    <h4 class="contourPageName">Graduate application form</h4>
    Please complete the following
    <div class="contourField text firstname  mandatory"><!-- Our label --> First Name
    <div><!-- The data entry control --></div>
    <!-- Our Tooltip --> <!-- Validation --></div>
    <div class="contourField text lastname  mandatory alternating"><!-- Our label --> Last Name
    <div><!-- The data entry control --></div>
    <!-- Our Tooltip --> <!-- Validation --></div>
    <div class="contourField text phonenumber  mandatory"><!-- Our label --> Phone Number
    <div><!-- The data entry control --></div>
    <!-- Our Tooltip --> <!-- Validation --></div>
    <div class="contourField text mobile  alternating"><!-- Our label --> Mobile
    <div><!-- The data entry control --></div>
    <!-- Our Tooltip --> <!-- Validation --></div>
    <div class="contourField text email  mandatory"><!-- Our label --> Email
    <div><!-- The data entry control --></div>
    <!-- Our Tooltip --> <!-- Validation --></div>
    <div class="contourField radiobuttonlist whichbestdescribesyoureligibilitytoworkinaustralia  mandatory alternating"><!-- Our label --> Which best describes your eligibility to work in Australia?
    <div><!-- The data entry control --> <span class="radiobuttonlist">Citizen/Permanent Resident<br />Holder of a working visa<br />Require sponsorship<br />Other</span></div>
    <!-- Our Tooltip --> <!-- Validation --></div>
    <div class="contourField  pleaseattachyourcoverletter  mandatory"><!-- Our label --> Please attach your cover letter
    <div><!-- The data entry control --> <span></span></div>
    <!-- Our Tooltip --> <!-- Validation --></div>
    <div class="contourField  pleaseattachyourresumé  mandatory alternating"><!-- Our label --> Please attach your resumé
    <div><!-- The data entry control --> <span></span></div>
    <!-- Our Tooltip --> <!-- Validation --></div>
    <div class="contourField  pleaseattachyouracademicresultsothersupportingdocumentsifrelevant "><!-- Our label --> Please attach your academic results/other supporting documents (if relevant)
    <div><!-- The data entry control --> <span></span></div>
    <!-- Our Tooltip --> <!-- Validation --></div>
    <div class="contourNavigation"></div>
    </div>
    <!-- endUmbMacro --></div>

    Note: I'm a novice! I'm teaching myself as I go. So it may be obvious to others. But if I could see a working example that would be great. So far I can't find any documentation that outlines it, and every time somebody talks about it on the forums they refer to an approach without explicitly showing it on the post! :-)

    I think it's something to do with needing some <form> tag, runat="server", that sort of thing... but I can't find the correct syntax anywhere.

    Thanks in advance!

  • Evan Jardine 108 posts 168 karma points
    Feb 19, 2010 @ 01:45
    Evan Jardine
    0

    Hi Philip

    For the form to display and function you will need it to be contained within <form ranat="server"></form> tags.

    For Example, in your template:

    <form id="myForm" ranat="server">

        << insert contour form using macro >>

    </form>

    Hope this helps you.

    Cheers

    Evan

  • Neil Campbell 58 posts 182 karma points
    Feb 19, 2010 @ 02:41
    Neil Campbell
    0

    Hey Evan,
    Just a quick note it's actually runat="server"

  • Philip Brookes 4 posts 24 karma points
    Feb 19, 2010 @ 02:46
    Philip Brookes
    0

    Evan, you've made the comment "in your template"... can I just clarify, it's imperative that it's placed in the template? I've been trying to place it directly into the content page, but this apparently doesn't work/isn't possible?

  • Neil Campbell 58 posts 182 karma points
    Feb 19, 2010 @ 02:58
    Neil Campbell
    0

    Hi Phillip,
    This should work no worries, as I have Contour working in the same way.

    I think there were some issues in earlier version with inserting a Contour form via the RichText editor.
    I would upgrade your Contour version to the latest nightly build:

    http://nightly.umbraco.org/Umbraco%20Contour/1.0.8/

    Do a backup, and then use the update zip to update your contour version.

    Hope this help :)

    Cheers,
    Neil

  • Philip Brookes 4 posts 24 karma points
    Feb 19, 2010 @ 05:28
    Philip Brookes
    0

    Thanks Neil! Running around like a chicken without a head right now, so will try to look at that over the weekend and see if it fixes it...

    Cheers!

  • Neil Campbell 58 posts 182 karma points
    Feb 19, 2010 @ 06:37
    Neil Campbell
    0

    Haha no worries.
    Another thing to try if that doesn't work is to check that you are not nesting forms or have more than one server form (<form runat="server">) in the template.

    Cheers,
    Neil

  • Evan Jardine 108 posts 168 karma points
    Feb 19, 2010 @ 21:58
    Evan Jardine
    0

    Looks like you've got this sorted, sorry about the typo...

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies