cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
field and label display order
April 5, 2008
8:16 pm
zink
Guest

Please replace the ??? with your data!

  • Your URL: http://???
  • The browser used: Firefox
  • cforms version: 8.02
  • Your Wordpress version: 2.5

Hello. I'd like to adjust the layout a little bit for how the forms are displayed. I've been able to successfully style the forms as far as colors, sizes, and alignment, but I can't seem to figure out how to change the order in which the fields and their labels are displayed.

Currently, I've styled the forms to display the label, field and any reqtxt all on one line through floats. It looks great. But, by default the forms are displayed in the following order: Label | Field | reqtxt (if applicable). I'd like to adust the forms so that they display as: Field | Label | reqtxt.

It seems like this would be a simple task, but after delving into the *.php file and discovering its complexitiy, I didn't want to risk breaking anything. I definitely appreciate your help in explaining what I need to do to achieve the desired result. Maybe I missed something in the admin panel and don't need to alter the PHP?

Also, there's one more thing I was wondering. Is there a way to display a field sans its label? For example, I'd like to remove the label from the 'message' form so only the field for that form is displayed. I tried deleting the label name in the admin panel, but that didn't seem to change anything.

I appreciate your help with my query
Many thanks in advance.

Kind Regards.
BJ

April 5, 2008
9:46 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

But, by default the forms are displayed in the following order: Label | Field | reqtxt (if applicable). I'd like to adust the forms so that they display as: Field | Label | reqtxt.

Correct, and it is the only way cforms currently renders the form. You can use CSS to pretty much control the complete look&feel, of course with certain limitations. Swaping HTML elements (label vs. input field) can not be done.

Also, there's one more thing I was wondering. Is there a way to display a field sans its label?

Simply turn on label IDs in the CSS admin section and then use CSS to set display:none; for a given label element. Do keep the label name, otherwise you "loose" the label in the emails & DB tracknig as well!

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3763

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5359

Posts: 18742

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)