Phase transitions of polymer systems in external fields