The word used in the question, `secret', is anathema to the concept of marriage which is a relationship built to secure peace, happiness and tranquillity. There are many rights and obligations resulting from agreement of marriage. These include the honour and integrity of the woman concerned, her family and relations and most importantly, offspring. In so many instances, even with use of precautions, women get pregnant. How can they face this situation?
Where lies the blame? And what if the young couple tire of one another after taking what they want from one another? Who loses in such situations? That is why Muslim scholars frown upon secretive arrangements even though other basic formalities were satisfied. They argue that the Shari'ah has made it mandatory to publicise marriage in every available way. They quote a number of statements of the Prophet(SAW) to that effect. For example the statement, "There is no valid marriage without a guardian and two witnesses. Any arrangement short of that is invalid, invalid, invalid." Another statement quoted by the Hanafi texts, "Any marriage not attended by four people is not a marriage, it is a fornication. They are: the suitors, the guardian and two witnesses."
Scholars differentiate between two types of what is known as common marriage. Common, here, stands in contrast to well documented marriage. The first is when marriage takes place without being officially recorded. But it takes place within the family, is known among the friends and neighbours but for other reasons it is not registered. Maybe the couple are drawing unmarried benefits or whatever. This is an acceptable religious marriage even though there are unethical motives behind it.
The other type is exactly the one referred to in the question. When the two parties agree to keep it secret. They ask two friends to witness the marriage with the understanding that they do not talk about it. And they did not, I repeat, they did not register it. This does not amount to a secure, tranquil marriage. It is simply satisfying their physical need. The comment of a scholar, who was a judge before taking the chair of the Islamic Shari'ah in the Faculty of Law, Cairo University, is that "We do not condone, nor accept such an arrangement. It is far from the real concept of marriage. Families and girls' honour should not be treated so flippantly. In my life as a judge I came across so many miserable, depressing cases resulting in acrimonious disputes. Allah's Shari'ah has to be respectfully followed. Any so called legal fictions in this particular matter must be shunned."
And Allah says the Truth and guides to the right way.