added an isset to check if the reg form option has been set