Adding form functionality