 
   defmacro input(resource, name, opts \\ []) do
     quote do
+      IO.puts "------------> input: name: #{unquote(name)}"
       opts = Enum.into unquote(opts), %{}
       item = %{type: :input, resource: unquote(resource), name: unquote(name), opts: opts}
       var!(inputs, ExAdmin.Form) = [item | var!(inputs, ExAdmin.Form)]

          do: [selected: :selected], else: []
        option(item, [value: item] ++ selected) 
      end
    end
  end


        var!(input_blocks, ExAdmin.Form) = [] 
        unquote(contents)
        items = var!(input_blocks, ExAdmin.Form) |> Enum.reverse
        # IO.puts "----------------------------"
        # Enum.each items, fn(i) -> 
        #   IO.puts "----> form_view item: #{inspect i}"
        # end
        # IO.puts "----------------------------"
        ExAdmin.Form.build_form(conn, var!(resource), items, var!(params))
      end
    end
