If you invent something that you plan to patent, you should not disclose your invention to the public before filing a patent application.
Any disclosures that you make - no matter how small - become part of the 'prior art' and could invalidate your application.
Disclosing confidential information
You can freely discuss your invention with your qualified lawyer, solicitor and patent agent. This is because what you say to them is legally privileged and in confidence. They are professionally obliged not to tell anyone else, so the information will not become public knowledge.
However, if you need to discuss your invention with other people before you apply for the patent (eg potential manufacturers), a confidentiality agreement or a non-disclosure agreement (NDA) may be helpful.
An NDA is a legal contract between two parties not to disclose information that you have shared for a specific purpose.
NDAs will not suit every situation, and you should think carefully about what is included. Ideally, consult a qualified lawyer or patent agent for advice if you are thinking about talking to anyone else about your invention.
Read more on non-disclosure agreements.