signs.on_construct = function(pos)
   local meta = minetest.get_meta(pos)
   meta:set_string('formspec', 'field[text;;${text}]')
   meta:set_string('infotext', '')
end

signs.after_place_node = function(pos, placer)
   local meta = minetest.get_meta(pos)
   meta:set_string('owner',placer:get_player_name())
end

signs.on_receive_fields = function(pos, formname, fields, sender)
   local meta = minetest.get_meta(pos)
   if sender:get_player_name() == meta:get_string('owner') then
      if not fields.text then return end
      meta:set_string('text', fields.text)
      meta:set_string('infotext', fields.text)
   end
end
