A marriage by declaration was one of 3 forms of irregular marriage which were available in Scotland until the Marriage (Scotland) Act 1939 which came into force in 1941. They were Marriage by declaration of present intent; Marriage by cohabitation with habit and repute and Marriage by a promise of marriage followed by sexual intercourse on the faith of that promise.
Of these, marriage by cohabitation with habit and repute survived until the 21st Century and it is still possible to prove a marriage contracted in this way i.e. by living together for a sizeable period of time and being believed by most people to be husband and wife but it is not possible to start building up the cohabitation now.
The third type never really caught on for obvious reasons.
For the type you are talking about, marriage by declaration of present consent all that was needed was that the parties declared their intention to be married to each other from that moment onwards. This is not the same as a promise to marry at a future date. It was not necessary that there should be witnesses but it was almost impossible to prove unless there were witnesses
What people normally did was thereafter go along to the Sheriff Court to get the marriage registered, taking with them their witnesses or other proof.
It is important to remember that these forms of marriage were perfectly legal and gave exactly the same rights as were obtained by those who went through a formal ceremony. There was no need for registration for the marriage to be valid.
Researching M(a)cKenzie, McCammond, McLachlan, Kerr, Assur, Renton, Redpath, Ferguson, Shedden, Also Oswald, Le/assels/Lascelles, Bonning just for starters