change index.php add function configureFromFields