Skip to content

Commit

Permalink
example provided now adds a <label for="field_id"> and a <span id="fi…
Browse files Browse the repository at this point in the history
…eld_id">

Signed-off-by: Justin French <justin@indent.com.au>
  • Loading branch information
markmansour authored and justinfrench committed Jan 14, 2009
1 parent f1154cc commit 3482580
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.textile
Expand Up @@ -201,10 +201,10 @@ module JustinFrench #:nodoc:
class FancySemanticFormBuilder < SemanticFormBuilder

# new method to be added allowing full control over the label and value
def label_and_value(label_text, value, options = {})
options[:label] = label_text
content = input_label(label_text, options)
content += @template.content_tag(:span, value)
def label_and_value(label, value, options = {})
options[:label] = label
content = input_label(label, options)
content += @template.content_tag(:span, value, :id => "#{@object_name}_#{label}")
@template.content_tag(:li, content)
end
end
Expand Down

0 comments on commit 3482580

Please sign in to comment.