If a person cannot perform the prayer in its complete form, then they should do what they can, and what they are unable to do will be waived for them.
قال الله عز وجل : ( فَاتَّقُوا اللَّهَ مَا اسْتَطَعْتُمْ ) التغابن / 16
( … So be mindful of Allah to the best of your ability…)
Imam Al-Saadi, may God have mercy on him, said:
This verse indicates that every duty that a servant is unable to perform is waived for him and that if he is able to do some of what he is commanded and is unable to perform some of it, then he does what he is able to do, and what he is unable to do is waived for him. End quote.
“Tafsir Al-Saadi” (p. 868)