Giter VIP home page Giter VIP logo

bootstrap-form's People

Contributors

bgaze avatar ronvdberkmortel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bootstrap-form's Issues

Form store error: method not allowed

Hello,

first: thank you for this useful library! It really simplifies things.

I have an issue with using model binding with store and update. This is how I open the form:

/*[...]*/
@open(['model' => $news, 'update' => 'Backend\NewsController@update', 'store' => 'Backend\NewsController@store'])
/*[...]*/

Now if I try to save a new record I get the following error:

Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException thrown with message "The POST method is not supported for this route. Supported methods: GET, HEAD, PUT, PATCH, DELETE."

this is the definition for this route:

Route::group(['prefix' => 'backend', 'as' => 'backend.', 'namespace' => 'Backend'], function() {
    /* [...] */
    Route::group(['as' => 'contents.'], function() {
        Route::resource('news', 'NewsController');
    });
});

Updating an existing record works. Am I missing something? I'm using Laravel 6.5.0.

Edit: I can create new records when I use a different form @open(['action' => 'Backend\NewsController@store']), but I'd like to use the update-/store-option so I can use the same template for both actions.

Form Groups have a class of "test"

As the title states, it seems like you accidentally left some test data in the code, so Form Groups are gaining a class of "test". It shouldn't affect anything unless someone has a custom class with that name, but it's still probably something you don't want there. This can even be seen in the examples in the documentation.

Support for Bootstrap 5

Hello,

Since the third Alpha version of Bootstrap 5 will be out soon, it would be great if support could be added to this package. In my opinion, this package offers the best combination with regards to forms in Laravel and Bootstrap. I am sadly not too familiar with the inner workings of the package, else I would have created a proposal.

The changelog is not that huge regarding forms (https://v5.getbootstrap.com/docs/5.0/migration/):

  • Rearranged form documentation under its own top-level section.
    • Split out old Forms page into several subpages
    • Moved input groups docs under the new Forms section
  • Rearranged source Sass files under scss/forms/, including moving over input group styles.
  • Combined native and custom checkboxes and radios into a single .form-check class.
    • New checks support sizing via em/font-size or explicit modifier classes now.
    • New checks now appear larger by default for improved usability.
    • Dropped .custom-control and associated classes.
    • Renamed most $custom-control variables to $form-control ones.
  • Combined native and custom selects into .form-select.
    • Dropped .custom-select and associated classes.
    • Renamed most $custom-select variables to $form-select ones.
  • Updated file input component with the same overall design, but improved HTML.
    • Refactored .form-file markup to resolve some visual bugs while allowing translation and button text changes via HTML instead of CSS.
    • Dropped native .form-control-file and .form-control-range components entirely.
    • Renamed .custom-file to .form-file (including variables).
    • Added support for :focus and :disabled styles.
  • Renamed .custom-range to .form-range (including variables).
  • Dropped .form-group for margin utilities (we’ve replaced our docs examples with .mb-3).
  • Dropped .form-row for the more flexible grid gutters.
  • Dropped .form-inline for the more flexible grid.
  • Dropped support for .form-control-plaintext inside .input-groups.
  • Dropped .input-group-append and .input-group-prepend. You can now just add buttons and .input-group-text as direct children of the input groups.
  • Form labels now require the .form-label class. Sass variables are now available to style form labels to your needs. See #30476

I am not sure if it's best to support two versions of the package or to add a config variable to switch between v4 and v5. Since the forms are rather similar, it might be easiest to add a config variable.

Give file inputs a class of form-control

This is bordering on being a feature request, but it seems like file inputs remaining as the html standard while every other input has a form-control class makes the file input look out of place, while giving it a form-control class gives it the same shape and size as the rest of the inputs.

Without form-control:

without form control

With form-control:

with form control

Checkboxes not getting checked by default

  @checkbox('recently_sold','Include recently sold listings',1,true,['switch'=>true])

Not sure why but when It try to check a checkbox by default, it doesn't have that state. Am I doing something wrong?

custom-select

Liking this package so far.

Any way to add custom-select to a @select?

It should probably be the default tbh.

Blade directives are not working

I'm unable to render view through blade directive where BF facade is working.
brackets are missing for BF::close, it should be BF::close() in documentation otherwise this would throw an exception (Undefined class constant 'close').

Ability to add class to all input labels

Is there or could there be a way to automatically add a class to all labels, except functional labels for checkboxes/radios? It would be nice to add the 'form-label' class to all form group labels, instead of having to specify the label and its class for each input.

Radio and checkbox choice labels broken

Something in release 1.0.4 broke the labels of checkbox and radio choices. They are all inheriting the group name, so if a radio group is named "Colors", all radio choices will be labeled "Colors" as well.

Feedback on input groups is not visible

By default, feedback is not visible in Bootstrap 4. Feedback becomes visible when adjacent to an element with the class 'is-invalid'. This works for normal inputs, but input groups have a parent div which prevents the feedback from showing up.

ea58edd8788ec6fb1fecd4668aa926fb

The Bootstrap documentation avoids this issue by appending the feedback to the input instead of the form-group, keeping the feedback inside the input-group. Perhaps this functionality could be added to the feedback for input-group elements.

5c0a310ccfb6f5e377806ad2df330424

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.