215 Posts
cubist
9 years ago
1
Topic

Having an "ARRRRGGHH!" moment here guys... after upgrading a client's site.

There has got to be an easier way to do this.  I simply want the description for my field to appear in this order ... ( ie above the field ) :

  • DESCRIPTION
  • LABEL
  • FIELD HTML

YET ... all of the CCK Template options to place the description are:

  • At the right of Form/Value
  • Below Field
  • Below Form/Value
  • Below Label
  • Popover

Surely, the authors must have surmised devs would want them ABOVE as well, no?

Short of a solution my options are to:

  • create a NEW "text' field for every note I want above another field
  • move my notes to the preceding field (Yuck!)
  • Changing the Library option for the panel to "seb_cc3" (with Site and Fields selected) ... but it does NOT work. I have nothing cached and tried opening in Safari which I don't use (so I know it loaded the right HTML & CSS).
  • use JQuery to prepend() my text
  • _markup.php * (my fav)

* = the last work around is to rename the file: /templates/seb_one/fields/_markup.php to markup.php (remove underscore). One experiment I ran made conditionals NOT work tho (in Seblod v2 tho),  ... curious if a moderator can confirm this.

On or about line 46, change these items in the box, then the Description now appears above the Label

	$html	= '<div id="'.$cck->id.'_'.$field->name.'"color: #339933;">.$cck->mode.'s cck_'.$cck->client.' cck_'.$field->type.' cck_'.$field->name.'">'.$label.$html.$desc.'</div>';<br>
to:<br>
<pre>	$html	= '<div id="'.$cck->id.'_'.$field->name.'"color: #339933;">.$cck->mode.'s cck_'.$cck->client.' cck_'.$field->type.' cck_'.$field->name.'">'.$label.$desc.$html.'</div>';<br>
<br>
Just invert the vars: $html and $desc<br>
Get a Book for SEBLOD
233 Posts
pepperstreet
9 years ago
0
Level 1

Hello cubist,

funnily I have found your 1 year old topic ;) "Place Field Descriptions above the label, field and value"

Are you looking for a global solution, that is going to change all/many fields? Or a configuration option for certain fields? What about the basic HTML typography, it allows to output each part separately. You can output your order and markup as needed.

 

PS: I think the existing description options are comprehensive. The "above" location is very special, IMHO. In most cases, it is a secondary info. An additional hint, that should not distract the users eye. From UX point of view, I would never put it above the label and field. Not to mention a permanent display.

Get a Book for SEBLOD