Skip to content

Why is everything configured "globally" rather than on the FormBuilder? #1180

Open
@jensljungblad

Description

All config regarding how to render the forms are stored on the SimpleForm module. This makes it really difficult to render different kinds of forms, if I've understood the README correctly.

I have two sections of my app, and forms use different markup in these two sections.

The wrappers seem to be configurable, so I can create two wrappers for my two different form styles, however, there's lots of other config that is not specified per wrapper. The boolean_style and the button_class for instance.

What I don't understand is why these things are configured in an initializer instead of in the FormBuilder class? That way I could just create two subclasses and pass them to the simple_form_for helper.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions