Copied to clipboard

Flag this post as spam?

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


  • Jay 425 posts 652 karma points
    Jan 03, 2013 @ 19:18
    Jay
    0

    Contour Weird Spacing in between Label and Input Type

    I've got some problem with an empty gap in between my Label and Textfield which looks like below.
    The gap created pushes my Textfield a little bit down from their actual place.
    I'm using the new Contour to create the form.

    As you can see from code generated below, there's like an empty spaces in between the Label and the Input type which I do not know where does it comes from.

    Appreciate if someone can point me out on what needs to be done.

  • Comment author was deleted

    Jan 07, 2013 @ 09:54

    Hi it's due to a bug in the asp.net mvc framework, removing whitespace from the view should take care of it

    You can find the form view at the following location \Umbraco\plugins\umbracoContour\Views\Form.cshtml

  • Jay 425 posts 652 karma points
    Jan 07, 2013 @ 14:12
    Jay
    0

    Thanks. Issue resolved.

  • Martin Griffiths 826 posts 1269 karma points c-trib
    Jan 07, 2013 @ 15:12
    Martin Griffiths
    0

    Hi Tim

    Can you remove the whitespace from the sourcecode? Every time I upgrade I have to go through each file and remove the space.

    Thanks

    Martin

  • Comment author was deleted

    Jan 07, 2013 @ 15:24

    @Martin yup will do, could you tell me where the problems are?

  • Comment author was deleted

    Jan 07, 2013 @ 15:42

    Ok views have been updated to remove as much whitespace as possible

  • Martin Griffiths 826 posts 1269 karma points c-trib
    Jan 07, 2013 @ 16:46
    Martin Griffiths
    0

    Hi Tim

    It's on nearly practically every view!

     

    @model Umbraco.Forms.Mvc.Models.FieldViewModel
    SPACE HERE HAS TO BE REMOVED
    <input type="checkbox" name="@Model.Name" id="@Model.Id" 
        @if(Model.Mandatory){<text>  data-val="true" data-val-requiredcb="@Model.RequiredErrorMessage"</text>}
        @if(Model.ContainsValue("True")){<text>checked="checked"</text>}                                                                                                               
    />

     

  • Comment author was deleted

    Jan 08, 2013 @ 11:03

    @Martin updated and will be part of 3.0.6 release

  • Jeric 122 posts 192 karma points
    Mar 08, 2013 @ 18:48
    Jeric
    0

    I can't seems to find any whitespace at all but the empty space keep showing in the site for both the input type and textarea.

     

    @model Umbraco.Forms.Mvc.Models.FieldViewModel

    <input type="email" name="@Model.Name" id="@Model.Id" value="@Model.Value" class="input-clear margin_b_10" value="Enter your email address"

    @{if(Model.Mandatory||Model.Validate){<text>data-val="true"</text>}}

    @{if (Model.Mandatory){<text> data-val-required="@Model.RequiredErrorMessage"</text>}}

    @{if (Model.Validate){<text> data-val-regex="@Model.InvalidErrorMessage" data-regex="@Model.Regex"</text>}}

    />

     

     

     

    and

     

     

    @model Umbraco.Forms.Mvc.Models.FieldViewModel

    <textarea name="@Model.Name" id="@Model.Id" rows="4" cols="50" value="Enter your fundraising story" class="input-clear"

    @{if(Model.Mandatory||Model.Validate){<text>data-val="true"</text>}}

    @{if (Model.Mandatory){<text> data-val-required="@Model.RequiredErrorMessage"</text>}}

    @{if (Model.Validate){<text> data-val-regex="@Model.InvalidErrorMessage" data-regex="@Model.Regex"</text>}}

    >@Model.Value</textarea>

  • Mark 49 posts 130 karma points
    Mar 12, 2013 @ 21:40
    Mark
    0

    copy/paste form into wordpad, before '@model' there will show a blank space which you can't see in visual studio, select the space, find/replace all files in visual studio. Done.

    Cheers
    Mark 

  • Jeric 122 posts 192 karma points
    Mar 13, 2013 @ 10:24
    Jeric
    0

    Thanks mark, that solved my problem. High five to you 

    Cheers
    Jeric

     

Please Sign in or register to post replies

Write your reply to:

Draft