wallter / codeigniter_bootstrap_form_builder

Codeigniter + Bootstrap 2/3 Form Builder
MIT License
84 stars 67 forks source link

possible found some glitches (submit-button, select-field) ... #3

Closed kal60 closed 8 years ago

kal60 commented 9 years ago

Hi! Just installed your library. Great to use! But I think I found some minor errors:

1) the select-field generates attributes without separating spaces. Fixed this locally by adding an extra space in function _create_extra_string(): old:

  $extra .= "{$k}=\"{$v}\""; 

new:

  $extra .= " {$k}=\"{$v}\""; 

2) the submit-field generates the name and value-attibutes twice, so I changed the function _build_input():

            case 'form_submit':
                $name = $this->elm_options['id'];
                $label = $this->_make_label((isset($this->elm_options['label']) ? $this->elm_options['label'] : $this->elm_options['id']));

                // CHANGED:
                unset($this->elm_options['id']); // new
                unset($this->elm_options['label']); // new
                /* DELETED:
                if (!isset($this->elm_options['value'])) {
                    unset($this->elm_options['name']);
                }
                */

Now the errors in html are fixed. Maybe you'll have a look and can implement this as well ?

Still have some trouble when putting a form into a bootstrap "panel", the panel-size is not increased, so the form runs out of the panel.So I've to check this further ..

Thanks for that library !

Knut

using: codeigniter V.3.0.rc3, bootstrap 3.3.4, grocery-crud.1.5.1,font-awesome 4.3

wallter commented 9 years ago

Thanks for the fixes Knut, I've got your changes ready to push and they should be pushed today.

With the sizing... I'd love to help, do you have some sample code?

kal60 commented 9 years ago

Am 29.05.2015 um 19:06 schrieb wallter:

Thanks for the fixes Knut, I've got your changes ready to push and they should be pushed today.

With the sizing... I'd love to help, do you have some sample code?

— Reply to this email directly or view it on GitHub https://github.com/wallter/codeigniter_bootstrap_form_builder/issues/3#issuecomment-106872263.

Hi!

Thanks to offer your help. I found the problem a few moments later ... I'm new to bootstrap (and codeigniter) so I'm still making some mistakes ;-) I simply didn't use the row-class to define a new row for each panel (containing the forms). So the problem wasn't in the form but in the panels. Using a row for each panel fixed it.

Thanks.

Knut