Copied to clipboard

Flag this post as spam?

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


  • Stephen 94 posts 255 karma points
    Nov 26, 2013 @ 19:12
    Stephen
    0

    Think I have found a bug

    OK, so basically I frequently use forms with no headers, or field header text before the form, using standard page headers and text to provide the info.  If I insert a usercontrol form with the headers etc, I get this:

    <div umb_macroalias="umbracoContour.RazorRenderForm" umb_formguid="1e936af2-dfaf-4ee6-9712-e61a71e1####" ismacro="true" onresizestart="return false;" umbversionid="0d286d61-0b17-432c-aee6-e4da1e55####" umbpageid="23##" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro -->

    <div id="contour" class="requesta########">

    <div class="contourPage">

    <h4 class="contourPageName">Request a ########</h4>

    Some text is here....

    <div class="contourField fullname textfield mandatory">Full name

    <div></div>

    </div>

    <div class="contourField jobtitle textfield mandatory alternating">Job title

    <div></div>

    </div>

    <div class="contourField organisation textfield mandatory">Organisation

    <div></div>

    </div>

    <div class="contourField telephone textfield mandatory alternating">Telephone

    <div></div>

    </div>

    <div class="contourField email textfield">Email

    <div></div>

    </div>

    <div class="contourField enquirydetails textarea alternating">Enquiry details

    <div></div>

    </div>

    <div style="display: none;"></div>

    </div>

    <div class="contourNavigation"></div>

    </div>

    <!-- endUmbMacro --></div>

     

    This works. But if I insert the form without headers like this:

    <div umb_macroalias="umbracoContour.RenderForm" umb_formguid="1e936af2-dfaf-4ee6-9712-e61a71e1####" ismacro="true" onresizestart="return false;" umbversionid="c0ecf739-b309-4db7-a064-b113d8d2####" umbpageid="23##" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro -->

    <div id="contour" class="requesta######## ">

    <div class="contourField text fullname textfield mandatory"><!-- Our label -->Full name

    <div><!-- The data entry control --></div>

    <!-- Our Tooltip --> <!-- Validation --> </div>

    <div class="contourField text jobtitle textfield mandatory alternating"><!-- Our label -->Job title

    <div><!-- The data entry control --></div>

    <!-- Our Tooltip --> <!-- Validation --> </div>

    <div class="contourField text organisation textfield mandatory"><!-- Our label -->Organisation

    <div><!-- The data entry control --></div>

    <!-- Our Tooltip --> <!-- Validation --> </div>

    <div class="contourField text telephone textfield mandatory hasvalidator alternating"><!-- Our label -->Telephone

    <div><!-- The data entry control --></div>

    <!-- Our Tooltip --> <!-- Validation --> </div>

    <div class="contourField text email textfield"><!-- Our label -->Email

    <div><!-- The data entry control --></div>

    <!-- Our Tooltip --> <!-- Validation --> </div>

    <div class="contourField text enquirydetails textarea alternating"><!-- Our label -->Enquiry details

    <div><!-- The data entry control --></div>

    <!-- Our Tooltip --> <!-- Validation --> </div>

    <div class="contourNavigation"></div>

    </div>

    <!-- endUmbMacro --></div>

    This fails with a "Umbraco Contour will only work properly if placed inside a <form runat="server"> tag." error.

    Obviously I can work around by creating the for with the headings, then removing them, but it's not exactly an obvious workaround.  I am sure this is something relatively simple to fix in the core code to prvent this.

    Please note

    I have # out some of the codes, just in case it create a security risk making them public.

  • Comment author was deleted

    Nov 27, 2013 @ 15:35

    Yeah looks like you are inserting the usercontrol macro and that is a web control so you need to have that between a form with runat server tag like it says in the error message :)

    To avoid having to do this just use the razor macro instead

  • Stephen 94 posts 255 karma points
    Nov 28, 2013 @ 00:25
    Stephen
    0

    Hi Tim,

    I am inserting both exactly the same way. Using the insert macro button from the editor. Putting it very simply one works, one doesn't.  The one without the heading formation filled in doesn't work.  To me that sounds like a bug? No? Do you need more info??

    I am not using the razor version, as I am waiting for you to fix a bug in that for me.

    Thanks

    Stephen

  • Stephen 94 posts 255 karma points
    Nov 28, 2013 @ 03:10
    Stephen
    0

    Hi Tim,

    OK so it got weirder then, although I was asking for a usercontrol macro, when we have the headers etc it inserts a razor one (yes I did select usercontrol), when I don't have the headers etc, and ask for a usercontrol, it inserts the usercontrol one, which doesn't work.

    So I have no idea where this leaves us.  If you could just find the solution the razor problem for me, I won't care about the usercontrol stuff.

    Thanks

    Stephen.

  • Comment author was deleted

    Nov 28, 2013 @ 08:25

    Can you try inserting on a template and see if that works?

Please Sign in or register to post replies

Write your reply to:

Draft