Contacts and modal forms