         #   IO.puts "----> form_view item: #{inspect i}"
         # end
         # IO.puts "----------------------------"
-        ExAdmin.Form.build_form(conn, var!(resource), items, var!(params), script_block)
+        ExAdmin.Form.build_form(var!(conn), var!(resource), items, var!(params), script_block)
       end
     end
   end


  def wrap_item(field_name, model_name, label, error, contents) do
    ext_name = "#{model_name}_#{field_name}"
    error = if error in [nil, [], false], do: "", else: "error "
    li( class: "string input optional #{error}stringish", id: "#{ext_name}_input") do
      label(".label #{humanize label}", for: ext_name)
      contents.(ext_name)
    end

    end

    quote location: :keep, bind_quoted: [resource: escape(resource), contents: escape(contents)] do
      def form_view(var!(conn), unquote(resource) = var!(resource), var!(params) = params) do 
        import ExAdmin.Register, except: [actions: 1]
        # var!(query_options) = []
        var!(input_blocks, ExAdmin.Form) = [] 
