andrey613 / 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

Define width of Textbox #143

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I want to define the width of the text box so it isn't always the width of the 
form.  

I was able to do this by placing a decimal value in the .width() field of the 
jQuery creation in Textbox.php but want to do this on a per entry basis not 
globally.  What I am struggling with is how to do this efficiently with the 
existing code.  It should be easy but I just don't know PHP that well yet.

There may also be an easier way I am overlooking.

Original issue reported on code.google.com by bnowak...@gmail.com on 3 Jul 2011 at 2:26

GoogleCodeExporter commented 8 years ago
Try the following...

$form->addElement(new PFBC\Element\Textbox("Textbox:", "Textbox", array(
     "style" => "width: 100px;"
)));

Original comment by ajporterfield@gmail.com on 4 Jul 2011 at 1:03

GoogleCodeExporter commented 8 years ago
Tested out your suggestion and it works as expected :) ... THANKS!

Original comment by bnowak...@gmail.com on 4 Jul 2011 at 3:21

GoogleCodeExporter commented 8 years ago

Original comment by ajporterfield@gmail.com on 4 Jul 2011 at 3:35