added controller logic to addform.html