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

Update to Bootstrap 3 #205

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Are there any plans to update from Bootstrap 2 to 3, cause they made quite some 
changes and they say Bootstrap 3 is now final. 

Original issue reported on code.google.com by sietzeke...@gmail.com on 30 Aug 2013 at 11:03

GoogleCodeExporter commented 8 years ago
https://github.com/avbdr/php-form-builder-class/commit/df27cea48a19612935ba09485
413f453fa73e785

https://github.com/avbdr/php-form-builder-class/commit/4f1e01da267c77eda004e1d3f
aa5935c87b4ed5d

My mods to adjust library to bootstrap3. Might be a good start for porting.

Original comment by a.bute...@gmail.com on 4 Sep 2013 at 4:49

GoogleCodeExporter commented 8 years ago
Bootstrap has now moved from 3 to 3.0.2. If there any outlook on getting 
bootstrap 3.* integrated?

Original comment by JelleGFe...@gmail.com on 30 Dec 2013 at 8:16

GoogleCodeExporter commented 8 years ago
I'm wondering the same thing myself.
I've used PFBC for a multitude of things now, but looking at the stagnated 
development, I'm kind of wondering if it was a bad idea.

Original comment by arf...@gmail.com on 12 Jan 2014 at 2:22

GoogleCodeExporter commented 8 years ago
It doesn't look that hard to do, actually with very few simple fixes. Here's a 
start:

SideBySide.php change line 33 to:

echo '<div class="form-group">', $this->renderLabel($element), '<div 
class="col-sm-10">', $element->render(), $this->renderDescriptions($element), 
'</div></div>';

Then line 44 to:

echo '<label class="col-sm-2 control-label" for="', 
$element->getAttribute("id"), '">';

Then any of the elements that you want to add the "form-control" class to 
(which will make them 100% width), you need to add:

"class" => "form-control"

to the protected $_attributes array near the top of the file (make sure to add 
a comma before it if the array already has something in it).

For example, edit these files:

Date.php, DateTime.php, DateTimeLocal.php, Email.php, jQueryUIDate.php, 
Month.php, Number.php, Password.php, Phone.php, Search.php, Select.php, 
Textarea.php, Textbox.php, Time.php, Url.php, Week.php

Original comment by deadduck...@gmail.com on 6 May 2014 at 9:09