newhck / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

Difference in label for small and big items? => different style in CSS possible #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
example: 
form-elements.php
I have a predefined CSS:
...
label 
{float:left;margin-left:0.5em;width:20em;text-align:left;font-weight:bold}...

What is the expected output? What do you see instead?
All items are shifted. For most of them is it what i want. 
For some IE: textarea I don't want this. And i want to load a different CSS . 
But for now there is nothing to distinguish the one label from any other in 
CSS. IE: <label class="pfbc-label">

What version of the product are you using? On what operating system?
1.07

Original issue reported on code.google.com by sven.lar...@gmail.com on 6 Jul 2010 at 3:00

GoogleCodeExporter commented 8 years ago
If you look at the webpage's HTML source, you'll find that each element (label 
included) is wrapped in a <div> tag.  Each of these <div> tags has a unique id 
attribute that can be used in your css definitions to control the labels on a 
per element basis.

Version 1.0.7 also includes an element attribute - labelWidth - that can be 
applied to form elements to accomplish something similar to what you're doing 
based on the css you provided above.

The latest svn working copy includes an updated layout example file demoing 
this functionality.

- Andrew

Original comment by ajporterfield@gmail.com on 6 Jul 2010 at 3:45

GoogleCodeExporter commented 8 years ago
Andrew

I'm testing with the latest svn version now. r.268

For the Labelwidth to work properly I have to define the width of the form. 
But If you do so the solution for issue 60 is not working anymore. => define 
style
IE: $form->addTextbox("Titel:", "titel","",array("style" => "width: 200px;"));

Second problem: 
When you add a $form->addCKEditor and define the Labelwidth the editor 
overshoots the width of the form defined. A normal textarea seems ok. 

Original comment by sven.lar...@gmail.com on 7 Jul 2010 at 10:28

GoogleCodeExporter commented 8 years ago
The ckeditor form element is unique because it requires a substantial amount of 
width to function as intended.  Because of this, it's really not optimized to 
fit in a smaller width beside the element's label.

Original comment by ajporterfield@gmail.com on 13 Jul 2010 at 1:47

GoogleCodeExporter commented 8 years ago
Version 1.0.8 improved/extended support for the labelWidth form/element 
attribute to all form elements.  Also, the latest stable release - version 
1.0.9 - includes functionality for dynamically adjusting the width of form 
elements, including ckeditor, to ensure that they don't extend outside their 
containers.  Because of these two updates, I'm calling this issue "fixed."

Original comment by ajporterfield@gmail.com on 30 Aug 2010 at 2:47