dynamic_forms icon indicating copy to clipboard operation
dynamic_forms copied to clipboard

no way to attach classes to form elements

Open mwotton opened this issue 14 years ago • 5 comments

I'm trying to create a checkbox group. Unfortunately, the checkbox_group helper in pp/helpers/dynamic_forms/check_box_group_helper.rb doesn't provide a way to add a class to the generated label.

line 73: out << "

  • #{markup}
  • \n"

    I'm passing a custom block in now, but this doesn't help me much in the general run - I'd have to write different code for each different kind of form. Would it be reasonable to attach a class to all form elements?

    mwotton avatar Jan 12 '12 01:01 mwotton

    This sounds like a good idea. Maybe we should take this even further and add support for formtastic or something like that?

    ~ Tom

    tcocca avatar Jan 18 '12 12:01 tcocca

    yes, that'd be good. we ended up doing a lot more of it manually than I'd really have liked, formtastic support would have been excellent.

    mwotton avatar Jan 20 '12 03:01 mwotton

    Hi Mark, any chance you want to take a stab at this feature of adding formtastic support? Or even opening it up to adding more html option support to the fields somehow?

    ~ Tom

    tcocca avatar Feb 05 '12 13:02 tcocca

    @tcocca I'd like to, but I'm pretty pressed for time at the moment. will circle back when the current massive pile of work is looking less intimidating.

    mwotton avatar Feb 07 '12 22:02 mwotton

    Sounds like we are both in the exact same predicament. Hopefully that clears up soon. Keep me posted on this, don't want to end up doing double work.

    ~ Tom

    tcocca avatar Feb 08 '12 13:02 tcocca