Skip to content
Browse files

Updated README with inline_order customization.

Signed-off-by: Justin French <justin@indent.com.au>
  • Loading branch information...
1 parent 1d342d8 commit 6a74bc7b8fa822c1ffc60a9fd8cd8c97aa456207 @josevalim josevalim committed with Mar 4, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 README.textile
View
8 README.textile
@@ -177,7 +177,7 @@ If you wish, put something like this in config/initializers/formtastic_config.rb
Formtastic::SemanticFormBuilder.required_string = "(required)"
# Set the string that will be appended to the labels/fieldsets which are optional
- # Defaults to an empty string ("")
+ # Defaults to an empty string ("") and also accepts procs (see required_string above)
Formtastic::SemanticFormBuilder.optional_string = "(optional)"
# Set the way inline errors will be displayed.
@@ -194,6 +194,12 @@ If you wish, put something like this in config/initializers/formtastic_config.rb
# that is found on the object will be used.
# Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
Formtastic::SemanticFormBuilder.collection_label_methods = ["title_and_author", "display_name", "login", "to_s"]
+
+ # Formtastic by default renders inside li tags the input, hints and then
+ # errors messages. Sometimes you want the hints to be rendered first than
+ # the input, in the following order: hints, input and errors. You can
+ # customize it doing just as below:
+ Formtastic::SemanticFormBuilder.inline_order = [:hints, :input, :errors]
</pre>

0 comments on commit 6a74bc7

Please sign in to comment.
Something went wrong with that request. Please try again.