Sha256: bd2c381f397fe5662486cbfd453404a9b5eca27ae1ac5d4d0bcecb77c04b7c8d

Contents?: true

Size: 515 Bytes

Versions: 7

Compression:

Stored size: 515 Bytes

Contents

# frozen_string_literal: true

# Add a text-field, either specifying everything manually or using a model object on the form
#
# == Basic usage:
#    {%hidden_field name:"name" value:"Pencil"%}
#
# == Advanced usage:
#    {%hidden_field name%}
#
# This last usage requires a model on the form
#

require_relative './text_field_tag'

class HiddenFieldTag < TextFieldTag
  def initialize(tag, args, tokens)
    super
    @field_type = 'hidden'
  end
end

Liquid::Template.register_tag('hidden_field', HiddenFieldTag)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scribo-1.0.44 lib/scribo/liquid/tags/hidden_field_tag.rb
scribo-1.0.43 lib/scribo/liquid/tags/hidden_field_tag.rb
scribo-1.0.42 lib/scribo/liquid/tags/hidden_field_tag.rb
scribo-1.0.41 lib/scribo/liquid/tags/hidden_field_tag.rb
scribo-1.0.40 lib/scribo/liquid/tags/hidden_field_tag.rb
scribo-1.0.39 lib/scribo/liquid/tags/hidden_field_tag.rb
scribo-1.0.38 lib/scribo/liquid/tags/hidden_field_tag.rb