Inspired by RegistrationForm from simfatic