can I see this Comments* instead of *comments

5 views
Skip to first unread message

r/ Wobben

unread,
Apr 10, 2016, 3:27:31 PM4/10/16
to SimpleForm
Hello,

I have two questions.

1) Can I have comments* instead of * comments when comments is a required field.

2) How can I disable the tooltip?  I already have a text that is stated that * is required.

Regards,

Roeof

Carlos Antonio da Silva

unread,
Apr 10, 2016, 8:25:51 PM4/10/16
to plataformate...@googlegroups.com
Hello! Let's see if I can help:


1) There's a config called label_text that you can check on your simple_form initializer, you should be able to tweak it like this:

  config.label_text = lambda { |label, required, explicit_label| "#{label}#{required}" }

2) You can configure the required html with the locale, check the simple_form.en.yml file generated for you, and tweak the html option, for example:

      html: '<span class="required">*</span>'


Hope that helps!


--
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.



--
At.
Carlos Antonio

r/ Wobben

unread,
Apr 11, 2016, 1:24:06 AM4/11/16
to SimpleForm
Thanks.

I had a space between the #{label} and #{required}

Roelof
.

Op maandag 11 april 2016 02:25:51 UTC+2 schreef Carlos Antonio da Silva:
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simpleform+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
At.
Carlos Antonio
Reply all
Reply to author
Forward
0 new messages