Code Monkey home page Code Monkey logo

Comments (3)

Anahkiasen avatar Anahkiasen commented on May 30, 2024

Well my problem is that I recently refactored Bootstrapper's Buttons class which is what I use for buttons in my form. And I mean there is no easier way to do this, just Buttons::large_primary_submit('Submit') and I'm done.

From there I have to choices, either create an hard dependency on Bootstrapper and extend its Buttons class, or not provide any form of button and leave it to the user (ie. also known as the "washing my hands" technique). So you see I'm kind of in a pickle. The reason I don't list Bootstrapper as a dependency (which would cause it to be downloaded when someone installs Former) is I assume most user would consider this a drag. But now with your comment maybe it's even worse not having any buttons so I'll probably change that.

from former.

TommyC81 avatar TommyC81 commented on May 30, 2024

I concur it'd be nice to have a standalone button class without depending on bootstrapper.

I'd be happy with something like: Former::button('Save')->class('btn btn-primary');
or Former::button('Cancel')->class('btn')->name('cancel')->value(1);

At least it'd be the same style without depending on another library.

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

Just added buttons, reset and submit as valid chainable fields in latest commits. Update your bundles.

from former.

Related Issues (20)

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.