Ref. no. 831/41-0000
In the name of Allah the most gracious the most merciful
The answer to your question is as follows:
One must know that standing (Qiyam), bowing (Ruku) and prostration (Sajdah) are pillars (Arkan) of Namaz. None of these integral parts can be missed without a genuine reason. If a person is not able to do Qiyam, but he can do Ruku and Sajdah, then he must perform namaz with ruku and sajda while sitting on the ground. If he offers namaz sitting on a chair, his namaz will not be valid. Nevertheless, if he is not able to do Ruku and Sajdah too, then he is allowed to offer namaz sitting on a chair, though it is better to sit on the ground in this case too. Note that the rear legs of the chair should be placed in line with the row throughout the prayer in all cases.
المشقۃ تجلب التیسیر (الاشباہ والنظائر 1/75) ۔
علامہ شامی لکھتے ہیں : اراد بالتعذر التعذر الحقیقی بحیث لوقام سقط او الحکمی بان خاف زیادتہ او بطء برئہ بقیامہ او دوران راسہ او وجد لقیامہ الما شدیدا صلی قاعدا۔ (درمختار وردالمحتار 2/9)
And Allah knows best
Darul Ifta
Darul Uloom Waqf Deoband