#1024 new
Tim Griffin

2.0.0.pre7 adding blank lines after field labels

Reported by Tim Griffin | December 6th, 2012 @ 02:50 PM

In a brand new 2.0.0.pre7 project, Hobo is adding many blank lines with a &nbsp after each label element, causing a bad layout as shown in screen shot.

<fieldset class="feckless-fields"><div class="field  name-field"><label class="name-label" for="project_name">          Name
        </label>
        &nbsp;
        
              <input class="name-tag string project-name" id="project_name" name="project[name]" type="text">


</div><div class="field  city-field"><label class="city-label" for="project_city">          City
        </label>
        &nbsp;
        
              <input class="city-tag string project-city" id="project_city" name="project[city]" type="text">


</div></fieldset>

Comments and changes to this ticket

  • Tim Griffin

    Tim Griffin December 6th, 2012 @ 03:53 PM

    The &nbsp is coming from Line 84 of feckless_fieldset.dryml. But, if that is removed, there is a potential problem for preceding fields that may not have a value. In the attached screenshot (Hobo8324-b.jpg), the "Description" field does not have a value. If the &nbsp on Line 84 is removed, the next field ("Lease Start Date") field arrives on the same line as the "Description" label.

  • Bryan Larsen

    Bryan Larsen December 7th, 2012 @ 01:43 PM

    Are you referring to blank lines in the code or just the layout of the rendered form? If you're talking about the rendered view you can get the more traditional layout by adding a "horizontal" class to your form...

  • Tim Griffin

    Tim Griffin December 7th, 2012 @ 02:50 PM

    The hobo8324-b screen shot above already had class="horizontal" on the form tag.

    I have determined, in a sample app, that the problem occurs only when the field is of type "text" and not when the field is type "string".

    When of type string, the fields display correctly on a #show page.

    When of type text, the fields display staggered, as shown in hobo8324-c.jpg.

    Sample project attached. Browse to http://localhost:3000/projects/2-my-second-project to see staggered layout.

  • Tim Griffin

    Tim Griffin December 7th, 2012 @ 02:50 PM

    • Tag changed from 2.0.0.pre7 label to 2.0.0.pre7 label, feckless

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Attachments

Pages