combined condition logic with material logic in the updateModel function in form view