Include Custom Hidden Field by Default

13 views
Skip to first unread message

Faraz Yashar

unread,
Mar 25, 2015, 9:27:28 PM3/25/15
to plataformate...@googlegroups.com
I'm trying to include a custom hidden field in all forms by default. The method I'm using right now feels very hacky (overriding simple_form_for), and I'm wondering if there's a sanctioned way to do this.

Thanks!

Carlos Antonio da Silva

unread,
Mar 25, 2015, 9:36:27 PM3/25/15
to plataformate...@googlegroups.com

Maybe it would be easier to just create another helper instead, which calls simple form with a custom block, yields the builder and concatenates the hidden field you want? It seems the easier way to achieve that I think.

Another would be to have your own form builder that inherits from simple form, but just for a simple hidden field it seems too much work.

Hope that helps.

Carlos Antonio da Silva - via celular

On Mar 25, 2015 10:27 PM, "Faraz Yashar" <faraz....@gmail.com> wrote:
I'm trying to include a custom hidden field in all forms by default. The method I'm using right now feels very hacky (overriding simple_form_for), and I'm wondering if there's a sanctioned way to do this.

Thanks!

--
You received this message because you are subscribed to the Google Groups "SimpleForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages