use sprintf() instead of multiline strings

use sprintf() instead of multiline strings in printModifyForm.
squash php notices about undefined variables.
fix spacing all over.