code for choices on pages updates working and creating new pages if choice wasn't done on a create