Why are we getting error when adding widget to our form?