Help please !!

My hubby for the last two tries had not been able to keep an erection for the first few mins he gets turned on then the moment he stands he loses it ..its taking such a toll on him he couldn't sleep last night due to it . Please help would this be counted as erectile dysfunction. I hope not because this has never happened before