CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Mysterious break in required profile fields
Pages: [1]

Author Topic: Mysterious break in required profile fields  (Read 868 times)

lou

  • Guest
Mysterious break in required profile fields
October 27, 2009, 01:49:34 pm
Greetings.  I'm trying to copy a profile form into a drupal node.  I've copied the HTML snippet from the profile, but when I view the node, the asterisk for required fields appears below the field label, on a new line.  When I look at it with Firebug, there's a mysterious
Code: [Select]
<br /> after the text "First Name" from the label cell (see snippet below).

CODE FROM PROFILE SNIPPET
Code: [Select]
<table class="form-layout-compressed"><tr id="editrow-first_name"><td class="label"><label for="first_name">  First Name
   <span class="marker" title="This field is required.">*</span>
</label></td><td class="edit-value"><input maxlength="64" size="30" name="first_name" type="text" id="first_name" class="form-text big required" /></td></tr>

CODE AS DISPLAYED IN NODE
Code: [Select]
<table class="form-layout-compressed">
<tbody>
<tr id="editrow-first_name">
<td>
First Name
<br/>
<span class="required_field" title="This field is required.">*</span>
</td>
<td class="edit-value">
<input id="first_name" class="form-text big required" type="text" name="first_name" size="30" maxlength="64"/>
</td>
</tr>

How can I get rid of the line break?  It makes my form look odd  :)

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Mysterious break in required profile fields
October 27, 2009, 06:42:14 pm
This seems like a Drupal issue - no idea why the markup would be altered (theme ??). You might try removing the class="marker" on the spans ? before pasting into your node.
Protect your investment in CiviCRM by  becoming a Member!

davel454

  • Guest
Re: Mysterious break in required profile fields
June 14, 2010, 07:12:48 pm
Not sure if you figured this out, but I had the same problem today.

I figured out that the html code that you paste in has extra spaces/breaks in it.  All you need to do is erase all of the spaces before this:
Code: [Select]
<span class="marker" title="This field is required.">*</span>

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Mysterious break in required profile fields

This forum was archived on 2017-11-26.