A:
You have to make Ghusl whether you discharged the Maniy on your clothes or in the toilet,
because the ruling of making Ghusl after wet dreams is dependent on the discharge of Maniy. The Prophet (peace be upon him) said:
“Water (Ghusl) is only for water (emission of Maniy).”
Also, he (peace be upon him) answered
Um Sulaym (may Allah be pleased with her) when she asked him saying:
“Verily, Allah is not shy of (informing of) the truth. Does a woman have to do Ghusl if she has a wet dream?” He (peace be upon him) said, “Yes, if she sees the water (i.e. Discharge).”
.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.