 
 build_collection_form = (collection) ->
   form = $('<form>').attr('id','collection_form')
+  
+  form.append $('<input>').attr('type','hidden').attr('id','namespaceMapping').attr('value',$(collection).find('namespaceMapping').attr('abbr'))
+  form.append $('<input>').attr('type','hidden').attr('id','collection_name').attr('value',$(collection).attr('name'))
+
   properties = $(collection).find('citeProperty')
   add_property_to_form(property,form) for property in properties
 

  column_names = []
  row_values = []
  for child in $('#collection_form').children()
    if $(child).attr('id')
      column_names.push fusion_tables_escape($(child).attr('id'))
      row_values.push fusion_tables_escape($(child).val())
  fusion_tables_query "INSERT INTO #{collection} (#{column_names.join(', ')}) VALUES (#{row_values.join(', ')})", (data) ->

    when 'citeurn', 'citeimg'
      # for the special case of the "URN" field, we want to construct the value
      if $(property).attr('name') == 'URN'
        $('<input>').attr('style','width:100%').prop('disabled',true)
      else
        $('<input>').attr('style','width:100%')
    when 'datetime'
