re-added online/offline check on form submission