Added logic for saving form configuration