# File lib/cgikit/elements/form.rb, line 98
    def append_to_response( response, context )
      take_value(:method)
      take_value(:enctype)
      take_value(:href)
      take_value(:query)
      take_bool(:secure)
      take_bool(:upload)
      take_value(:session_id)
      take_value(:direct_action, false)
      take_value(:action_class)

      attrs = {}
      unless (@values[:method].downcase == 'post') or \
        (@values[:method].downcase == 'get') then
        @values[:method] = 'post'
      end
      attrs[:method] = @values[:method]
      attrs[:enctype] = @values[:upload] ? MULTIPART_FORM_DATA : @values[:enctype]

      attrs[:name] = name_value(context)
      if @values[:href] then
        url = @values[:href]
      elsif direct_action? then
        url = context.direct_action_url(@values[:action_class],
                                        @values[:direct_action],
                                        {},
                                        @values[:session_id])
      else
        secure = has_binding?(:secure) ? @values[:secure] : context.request.https?
        url = context.component_action_url({}, secure)
      end
      attrs[:action] = url

      attrs.update(optional_attributes())
      other_s = other_attribute()

      tag = HTMLTag.form(attrs, other_s)
      query = @values[:query] || {}
      ask(:form_will_generate_tag) do |d|
        tag = d.form_will_generate_tag(tag, query) || tag
      end

      response.content << tag.open_tag
      response.content << "\n"
      response.content << hidden_fields(query)
      @node.append_to_response(response, context)
      response.content << tag.close_tag
    end