How Long Do Drugs Stay In Your System?

March 4, 2025

Unravel how long drugs stay in your system, from detection windows to factors affecting drug clearance.

Understanding Drugs in the Body

Understanding how long drugs stay in your system starts with a basic knowledge of drug metabolism and the factors that influence drug elimination.

Introduction to Drug Metabolism

Drug metabolism refers to the process through which the body breaks down and eliminates drugs. When a drug enters the body, it undergoes a process called biotransformation. During biotransformation, enzymes in the liver transform the drug into metabolites. These metabolites are often less active than the original drug and are easier for the body to eliminate.

The rate at which a drug is metabolized can influence how long it remains detectable in the body. For instance, drugs that are metabolized slowly may remain in the body for longer periods than drugs that are metabolized quickly.

Factors Influencing Drug Elimination

Several factors can influence how quickly a drug is eliminated from the body.

Individual metabolic rate: People with faster metabolic rates may eliminate drugs more quickly than those with slower metabolic rates.

Age: Older adults often metabolize drugs more slowly than younger individuals. This means drugs may remain in an older person's system longer than in a younger person's system.

Health status: Health conditions, particularly those affecting the liver or kidneys, can slow drug metabolism and extend the time it takes for a drug to leave the body.

Drug characteristics: The type of drug, its dosage, and frequency of use can also impact how long it stays in the system. Drugs with a long half-life, high dosage, or frequent use may take longer to eliminate.

Understanding these factors can help provide a more accurate estimate of how long a specific drug may stay in your system. However, it's important to note that these estimates can vary significantly from person to person and are influenced by a multitude of factors. As such, they should be taken as general guidelines rather than definitive timelines.

In the following sections, we will explore the detection window of common drugs, different testing methods for drug detection, individual variations in drug clearance, the influence of drug characteristics on detection time, and tips for rapid drug clearance.

Detection Window of Common Drugs

Understanding how long drugs stay in your system is vital for those undergoing drug testing. This detection window varies significantly from one substance to another. Below, we discuss the detection times for common drugs, including marijuana, cocaine, opioids, and amphetamines.

Marijuana

Marijuana, also known as cannabis, is a psychoactive drug derived from the Cannabis plant. The active ingredient, tetrahydrocannabinol (THC), can be detected in the body for varying lengths of time, depending on the frequency of use.

For occasional users, THC can be detected in urine for up to 3 days. However, for heavy users, it can remain detectable for up to 30 days. In blood tests, THC can be detected for 1 to 2 days in occasional users, and up to 25 days in heavy users.

Test Detection Time
Urine Test 3 - 30 days
Blood Test 1 - 25 days

Cocaine

Cocaine is a powerful stimulant drug. It can be detected in urine for 2 to 3 days after use. However, in heavy users, it can be detected for up to 2 weeks. In blood, cocaine can be detected for 1 to 2 days after use.

Test Detection Time
Urine Test 2 - 14 days
Blood Test 1 - 2 days

Opioids

Opioids, a class of drugs that includes substances like heroin and prescription pain relievers, can be detected in urine for 2 to 7 days after use. In blood, they can be detected for 6 to 12 hours after use.

Test Detection Time
Urine Test 2 - 7 days
Blood Test 6 - 12 hours

Amphetamines

Amphetamines, a group of synthetic psychoactive drugs, can be detected in urine for 1 to 3 days after use. In blood, they can be detected for 12 hours after use.

Test Detection Time
Urine Test 1 - 3 days
Blood Test 12 hours

It's important to remember that these detection times are estimates. They can vary depending on a range of factors, including the individual's metabolism, body weight, age, overall health, drug tolerance, and the frequency and potency of the drug used.

Testing Methods for Drug Detection

In order to determine how long drugs stay in your system, different testing methods are used. These typically include urine testing, blood testing, hair testing, and saliva testing. Each method has its own unique detection window and sensitivity.

Urine Testing

Urine testing is the most commonly used method for drug detection. It is non-invasive, easy to administer, and can detect the presence of many different substances. Drugs and their metabolites, the byproducts produced when the body processes substances, are often excreted in urine, which makes this a reliable method for drug detection.

The detection window for urine testing varies depending on the drug in question. For instance, marijuana can be detected in urine for up to 30 days after use, while cocaine can be detected for two to four days.

Blood Testing

Blood testing is a more invasive method of drug detection, but it has the advantage of being able to detect substances almost immediately after use. This is because when a person takes a drug, it enters the bloodstream before being metabolized and excreted.

Drugs typically stay in the bloodstream for a shorter period of time compared to urine. Cocaine, for example, can be detected in the blood for one to two days, while marijuana can be detected for up to two weeks.

Hair Testing

Hair testing is unique in that it can provide a much longer history of drug use. When a person uses a drug, the substances and their metabolites are incorporated into the hair as it grows. Therefore, a hair sample, usually taken from the scalp, can reveal drug use over a period of several months.

The detection window for hair testing is typically 90 days, but it can be much longer depending on the length of the hair sample.

Saliva Testing

Saliva testing is a non-invasive method of drug detection that can be used to detect recent drug use. It works by detecting the presence of drugs and their metabolites in a person's saliva.

The detection window for saliva testing is relatively short, typically a few hours to a couple of days. However, it can provide a quick and easy way to detect recent drug use.

Testing Method Detection Window
Urine Testing Several days to weeks
Blood Testing Hours to days
Hair Testing Up to 90 days
Saliva Testing Hours to days

It's important to note that the detection windows listed are approximate and can vary greatly depending on a variety of factors, including the specific drug, the frequency of use, the individual's metabolism, and other factors. Therefore, these figures should be used as a general guide rather than precise measurements.

Individual Variations in Drug Clearance

Understanding how long drugs stay in your system is a complex process due to the individual variations in drug clearance. Several personal factors can influence the duration a drug remains detectable in the body. These include age and metabolism, body weight and fat percentage, and liver and kidney function.

Age and Metabolism

Age plays a significant role in drug clearance from the body. As a person ages, their metabolic rate tends to slow down. This decrease in metabolism can lead to a longer detection window for drugs. Older adults may take more time to eliminate drugs from their system compared to younger individuals.

On the other hand, younger people, particularly children and teenagers, often have higher metabolic rates. This means they may be able to process and eliminate drugs from their system faster than older adults. However, it's essential to note that this can vary significantly from person to person.

Body Weight and Fat Percentage

Body weight and fat percentage can also influence how long drugs stay in the system. Many drugs are lipophilic, meaning they are attracted to fat cells in the body. Individuals with higher body fat percentages may store these drugs for longer periods, leading to a longer detection window.

Conversely, individuals with lower body fat percentages may eliminate drugs more quickly. However, losing weight rapidly can potentially release stored drugs into the bloodstream, temporarily increasing their detection window.

Body Type Drug Detection Window
High body fat Longer
Low body fat Shorter

Liver and Kidney Function

The liver and kidneys are vital organs for drug clearance. They work to metabolize and excrete drugs from the body. If an individual has impaired liver or kidney function, they may clear drugs from their system at a slower rate.

In contrast, individuals with healthy liver and kidneys are likely to process and eliminate drugs more efficiently, leading to a shorter detection window. It's essential to note that chronic or heavy drug use can damage these organs, negatively impacting their ability to clear drugs from the system.

Organ Function Drug Detection Window
Impaired liver/kidney function Longer
Healthy liver/kidney function Shorter

Understanding these individual variations can provide insight into how long drugs stay in a person's system. However, these factors are just part of the equation. Drug characteristics, such as their half-life, dosage, and frequency of use, also play a significant role in their detection window.

Influence of Drug Characteristics

The characteristics of the drug itself can significantly impact the length of time it stays in your system. This includes factors such as the drug's half-life, the dosage taken, and the frequency of use.

Drug Half-Life

The half-life of a drug is the time it takes for the amount of the drug in your system to be reduced by half. Drugs with short half-lives are metabolized and excreted more quickly than those with longer half-lives. The exact half-life varies greatly between different drugs, ranging from a few minutes to several days.

Here's an illustration:

Drug Half-Life
Cocaine 1 hour
Heroin 2-3 minutes
Marijuana 20-30 hours

These numbers are approximate and can be influenced by factors such as individual metabolism, body weight, and overall health.

Drug Dosage

The dosage of the drug also influences how long it stays in your system. Higher doses of a drug take longer to be fully metabolized and eliminated from the body. This is because the body can only process a certain amount of the drug at a time. Any excess must wait until the body is ready to metabolize it.

In addition, the method of administration can affect the drug's metabolism. For example, drugs that are ingested orally take longer to metabolize than those that are inhaled, injected, or absorbed through the skin.

Frequency of Use

The frequency of drug use also plays a significant role in how long the substance stays in the system. Frequent use can lead to the drug accumulating in the body, particularly in fatty tissues. This can prolong the detection window of the drug.

For example, a person who uses marijuana only once may test positive for the drug for up to three days. However, a regular user may test positive for up to 30 days or longer after their last use.

In conclusion, the characteristics of the drug itself, including its half-life, dosage, and frequency of use, significantly influence how long drugs stay in your system. Understanding these factors can provide a more accurate estimate of the detection window for different drugs.

Tips for Rapid Drug Clearance

While the length of time drugs stay in your system can be influenced by a variety of factors, there are a few general strategies that can help speed up the body's ability to eliminate substances. However, it's important to note that these methods are not guaranteed to completely clear drugs from your system before a drug test and should not be relied upon for this purpose.

Hydration

Drinking water can aid in the elimination process by helping to flush toxins out of the body through urine. However, it's vital not to overhydrate, as this can lead to water intoxication. The idea is to help your body function at its best by staying well-hydrated, not to try to dilute the presence of drugs in your system.
Exercise

Regular physical activity can potentially help speed up the drug elimination process. Exercise increases metabolism, which can help your body break down substances faster. It also promotes sweating, another method your body uses to expel toxins. However, exercise won't drastically reduce the timeframe in which drugs can be detected in your system, and excessive exercise can sometimes lead to false positives on drug tests due to the release of stored substances from fat cells.

Healthy Diet

Eating a balanced diet can support your body's natural detoxification processes. Foods high in fiber can help speed up the elimination of drugs by promoting healthy bowel movements. Meanwhile, avoiding foods high in fat and sugar can prevent the storage of substances in fat cells. It's also beneficial to avoid alcohol and caffeine, which can slow down the detoxification process.

Avoidance of Re-Intoxication

One of the most effective ways to clear drugs from your system is simply to stop using them. Continual use will keep replenishing the presence of the drug in your system, making it harder for your body to eliminate it. This includes avoiding both the primary substance of use and any secondary substances that can cause re-intoxication.

In conclusion, while these tips can support your body's natural detoxification processes, they are not foolproof methods for passing drug tests. The most reliable way to test negative is to avoid drug use entirely. Always remember that the timeframe for drug detection in the body varies greatly depending on many factors, including the type of drug, the frequency of use, the individual's metabolism, and the type of test being used.

References

[1]: https://www.drugs.ie/drugs_info/about_drugs/how_long_do_drugs_stay_in_your_system/

[2]: https://americanaddictioncenters.org/how-long-drugs-system

[4]: https://www.medicalnewstoday.com/articles/324315

[5]: https://compassionbehavioralhealth.com/blog/how-long-does-cocaine-stay-in-your-system-4-common-tests-and-factors/

Learn More

Find More Resources

The role of spirituality in addiction recovery

March 17, 2025
The Transformative Power of Spirituality in Overcoming Addiction

Every Hour a Baby Is Born Addicted to Opioids

March 17, 2025
Exploring the Epidemic Impacting Newborns Across America

The benefits of acupuncture in addiction recovery

March 17, 2025
Exploring Acupuncture's Role in Supporting Addiction Recovery

How Intensive Outpatient Programs Foster Independence

March 17, 2025
Unlocking Independence: The Role of Intensive Outpatient Programs in Recovery

I Dreamed About Using Drugs – What Does That Mean?

March 17, 2025
Navigating the Whys and Hows of Drug Dreams in Recovery

How to Build Emotional Intelligence in Recovery

March 17, 2025
Harnessing Emotional Intelligence for a Successful Recovery Journey

The importance of addressing perfectionism in recovery

March 17, 2025
Breaking the Chains of Perfectionism in Addiction Recovery

How Medication Management Supports Long-Term Sobriety

March 17, 2025
The Integral Role of Medication Management in Sustaining Recovery

The Importance of Medication Compliance in Recovery

March 17, 2025
Understanding Medication Adherence as a Cornerstone of Health Recovery

How CBT Addresses Triggers and Cravings

March 14, 2025
Exploring the Power of CBT in Combating Addiction

How Ambulatory Detox Fits into a Comprehensive Recovery Plan

March 14, 2025
Ambulatory Detox: Navigating the Path of Recovery with Flexibility and Support

The benefits of therapy for addressing codependent relationships

March 14, 2025
Unlocking Healthier Relationship Dynamics through Therapy

How to Safely Manage Withdrawal Symptoms at Home with Ambulatory Detox

March 14, 2025
Effective Strategies for At-home Detoxification: A Guide to Ambulatory Withdrawal Management

How PHP and IOP Help with Dual Diagnosis Treatment

March 14, 2025
Understanding PHP and IOP in Dual Diagnosis Treatment

The Role of Group Therapy in PHP Programs

March 14, 2025
Unveiling the Impact of Group Therapy in Partial Hospitalization Programs

The Benefits of Adventure Therapy in Addiction Recovery

March 14, 2025
Exploring the Transformational Power of Adventure Therapy

The Role of Mentorship in Addiction Recovery

March 14, 2025
Mentorship: A Pillar of Support in Overcoming Addiction

How to handle depression and anxiety in recovery

March 14, 2025
Navigating Emotional Health During Recovery

The Role of Holistic Approaches in Medication Management Programs

March 14, 2025
Integrating Holistic Practices into Modern Medication Management

How PHP and IOP Offer Different Levels of Care for Addiction Recovery

March 14, 2025
Understanding the Distinct Roles of PHP and IOP in Addiction Treatment

How to find balance between recovery and daily life responsibilities

March 14, 2025
Balancing Recovery and Daily Life: A Guide to Sustainable Sobriety

How Medication-Assisted Withdrawal Can Ease Detox Symptoms

March 14, 2025
Unlocking the Potential of Medications in Detoxification

Why PHP and IOP Are Effective for Long-Term Recovery

March 14, 2025
Understanding the Impact of PHP and IOP on Sustained Recovery

The Importance of Accountability in Intensive Outpatient Programs

March 14, 2025
Enhancing Recovery Through Accountability: An In-Depth Look at IOPs

The importance of family involvement in addiction recovery

March 14, 2025
Uniting Families: The Key to Successful Addiction Recovery

Understanding the Impact of Addiction on Family Dynamics

March 14, 2025
Understanding the Impact of Addiction on Family Dynamics

How to Navigate Difficult Conversations About Addiction in Family Therapy

March 14, 2025
Facilitating Open Dialogues on Family Addiction

How Cognitive-Behavioral Therapy Reduces the Risk of Relapse

March 14, 2025
Harnessing CBT for Effective Relapse Prevention in Addiction and Mental Health

How to use yoga as a tool for addiction recovery

March 14, 2025
Leveraging Yoga for Holistic Addiction Recovery

The Benefits of Including Loved Ones in the Recovery Process

March 14, 2025
Understanding the Transformative Role of Family in Addiction Recovery

The role of education in understanding addiction and recovery

March 14, 2025
Transformative Power of Education in Combating Addiction and Steering Recovery

The Benefits of Encouraging Open Communication in Family Therapy

March 14, 2025
Unlocking the Power of Open Communication in Family Therapy

How Robin Recovery supports individuals with dual diagnoses

March 14, 2025
Robin Recovery's Comprehensive Approach to Dual Diagnosis Treatment

How CBT Improves Self-Awareness in Recovery

March 14, 2025
Uncovering the Transformative Power of CBT in Addiction Recovery

The Role of Medication Management in Preventing Relapse After Detox

March 14, 2025
Exploring Medication Management's Impact on Sustaining Sobriety After Detox

How Family Therapy Encourages Healthy Conflict Resolution

March 14, 2025
Exploring the Role of Family Therapy in Handling Conflicts Effectively

The importance of addressing unresolved anger in therapy

March 14, 2025
Understanding and Transforming Anger Through Therapy

The importance of addressing unresolved anger in therapy

March 14, 2025
Understanding and Transforming Anger Through Therapy

How to create a healthy work-life balance during recovery

March 14, 2025
Mastering Work-Life Harmony in Addiction Recovery

How to Develop a Family Relapse Prevention Plan

March 14, 2025
Crafting a Family-Focused Relapse Prevention Strategy

How Outpatient Programs Provide Flexibility in Addiction Treatment

March 14, 2025
Exploring the Flexible Nature of Outpatient Addiction Treatment

The Benefits of Medication-Assisted Treatment for Opioid Addiction

March 14, 2025
Exploring MAT: A Pathway to Sustainable Recovery

The Importance of Flexibility in Intensive Outpatient Programs

March 14, 2025
How Flexibility Transforms Outpatient Treatment Programs

How to deal with anger and frustration during recovery

March 14, 2025
Managing Emotions: Navigating Anger in Recovery

How Yoga Supports Physical and Emotional Healing in Recovery

March 14, 2025
Unveiling the Healing Powers of Yoga in Recovery

The Science Behind CBT and Its Effectiveness in Treating Addiction

March 14, 2025
Unveiling CBT's Role in Addiction Recovery

How to Incorporate Cognitive-Behavioral Therapy into Your Recovery Plan

March 14, 2025
Embracing CBT for Effective Addiction Recovery

How to stay accountable in the recovery process

March 14, 2025
Building a Foundation for Lasting Recovery Through Accountability

How to Manage Withdrawal Symptoms Safely at Home

March 14, 2025
Navigating Withdrawal: Strategies for Safe Home Management

How CBT Addresses Underlying Mental Health Issues in Addiction

March 14, 2025
Exploring the Intersection of CBT and Addiction Recovery

How to Navigate Work and Career After Rehab

March 14, 2025
Returning to Work: A Journey After Rehab Recovery

How to Set Healthy Boundaries in Outpatient Treatment

March 14, 2025
Strategies for Successful Boundary Setting in Recovery Treatment

The Benefits of Educational Workshops in Rehab Programs

March 14, 2025
Exploring the Transformative Role of Educational Workshops in Addiction Recovery

Understanding the Role of Medication in Detox and Withdrawal Management

March 14, 2025
Exploring Medication's Role in Detox and Managing Withdrawal

How to Find Joy and Fulfillment in Sobriety

March 14, 2025
Discovering Happiness After Overcoming Addiction

Understanding the Differences Between PHP and IOP

March 14, 2025
Comparing PHP and IOP for Addiction and Mental Health Treatment

How to address anger and frustration constructively during treatment

March 14, 2025
Harnessing Anger Constructively: Strategies for Patients in Treatment

How Cognitive-Behavioral Therapy Helps with Self-Discovery and Growth

March 14, 2025
Unlocking Personal Growth through Cognitive Behavioral Therapy

How to create a vision board for your recovery journey

March 14, 2025
Crafting Your Path to Lasting Recovery Through Vision Boards

The benefits of journaling during addiction recovery

March 14, 2025
Unleashing the Power of Journaling in Overcoming Addiction

The Importance of Sleep in Recovery from Addiction

March 14, 2025
The Critical Role of Sleep in Overcoming Addiction

The connection between addiction and past trauma

March 14, 2025
Exploring the Profound Links Between Trauma and Addiction

How to prevent relapse during difficult emotional times

March 14, 2025
Strategies for Maintaining Recovery When Emotions Run High

The benefits of focusing on small, achievable steps toward goals

March 14, 2025
Harnessing the Power of Incremental Progress for Ultimate Success

How to address underlying fears and insecurities in therapy

March 6, 2025
Overcoming the Shadows: Therapy as a Path to Self-Empowerment

The Impact of Peer Support Groups on Long-Term Sobriety

March 6, 2025
How Peer Support Groups Transform the Sobriety Journey

Understanding Cognitive-Behavioral Therapy (CBT) for Addiction Treatment

March 6, 2025
Exploring CBT's Role in Overcoming Substance Use Disorders

The Role of Nutrition in Supporting Recovery from Addiction

March 6, 2025
Understanding Nutrition's Vital Influence on Overcoming Addiction

How to rebuild relationships with family members after addiction

March 6, 2025
Navigating the Path to Family Reconciliation Post-Addiction

What to Expect from Medication Management in Addiction Recovery

March 6, 2025
Understanding the Comprehensive Role of Medication Management in Addiction Treatment

The Benefits of Peer Support in Ambulatory Detox Programs

March 6, 2025
Exploring the Impact of Peer Support in Outpatient Detoxification Processes

How to Stay Engaged in Long-Term Addiction Recovery

March 6, 2025
Strategies for Commitment and Engagement in Sobriety

The Benefits of Personalized Addiction Treatment Programs

March 6, 2025
Exploring the Advantages of Customized Recovery Plans

Common Myths About Ambulatory Detox and the Truth Behind Them

March 6, 2025
Debunking Misconceptions: Understanding Ambulatory Detoxification

How to Support a Loved One Without Enabling Their Addiction

March 6, 2025
Balancing Support and Independence in Addiction Recovery

How to Set Healthy Boundaries During Family Therapy Sessions

March 6, 2025
Navigating Boundaries: A Guide to Family Therapy Success

How to Use Family Therapy to Address Past Trauma and Resentment

March 6, 2025
Healing Through Family Therapy: Strategies to Overcome Trauma and Resentment

The Role of Family Therapy in Preventing Future Addictive Behaviors

March 6, 2025
Exploring Family's Vital Role in Combating Addiction

Understanding opiate addiction and effective treatment options

March 6, 2025
Comprehensive Approaches to Addressing the Opioid Crisis

The Role of Family in Preventing Relapse and Encouraging Sobriety

March 6, 2025
How Families Fuel the Journey to Sobriety

The Role of Family in Preventing Relapse and Encouraging Sobriety

March 6, 2025
How Families Fuel the Journey to Sobriety

The Role of Siblings in Supporting a Loved One’s Recovery

March 6, 2025
Harnessing the Power of Sibling Support in Addiction Recovery

How to Transition Off Medications Safely in Recovery

March 6, 2025
A Comprehensive Guide to Safely Taper Medication in Recovery

How CBT Helps Individuals Overcome Negative Thought Patterns

March 6, 2025
Unlocking the Power of CBT for Better Mental Health

How CBT Helps Individuals Overcome Negative Thought Patterns

March 6, 2025
Unlocking the Power of CBT for Better Mental Health

How Medication-Assisted Treatment Helps Improve Recovery Outcomes

March 6, 2025
Exploring the Impact of Medication-Assisted Treatment on Recovery

The Role of Forgiveness in Family Therapy and Addiction Recovery

March 6, 2025
Unlocking Healing: Forgiveness as a Key to Family and Recovery Success

The Connection Between Withdrawal Management and Mental Health

March 6, 2025
Exploring the Double-Edged Sword of Withdrawal and Mental Health

How to Address Financial Struggles Caused by Addiction in Family Therapy

March 6, 2025
Navigating Financial and Emotional Challenges in Family Therapy for Addiction

How to Strengthen Family Bonds Through Recovery and Healing

March 6, 2025
Rebuilding Family Connections in the Journey of Addiction Recovery

The Role of Education in Family Therapy for Addiction Recovery

March 6, 2025
Educational Guidance: A Catalyst in Family Therapy for Addiction Recovery

The Benefits of Multi-Family Therapy Groups in Addiction Recovery

March 6, 2025
Exploring the Impact of Multi-Family Therapy in Overcoming Addiction

The Importance of Goal-Setting in Cognitive-Behavioral Therapy

March 6, 2025
Unlocking the Power of Goal-Setting in CBT for Better Mental Health Outcomes

The Pros and Cons of Medication Management in Addiction Recovery

March 6, 2025
A Balanced Look at Medication Strategies in Addiction Treatment

The Benefits of Family Therapy in Strengthening Support Systems

March 6, 2025
Exploring the Impact of Family Therapy on Relationship Dynamics

How to Help a Family Member Struggling with Addiction Seek Treatment

March 6, 2025
Supporting Your Loved One: Navigating the Path to Recovery

The role of group therapy in building a support network

March 6, 2025
Understanding the Impact of Group Therapy on Support Networks

How CBT Techniques Improve Emotional Regulation

March 6, 2025
The Role of CBT in Enhancing Emotional Mastery

The Role of Family Support in Intensive Outpatient Programs

March 6, 2025
Exploring Family Involvement for Enhanced Recovery in IOPs

How to rebuild relationships after addiction

March 6, 2025
Rebuilding Connections: Healing After Addiction

Get Started Today

Get in touch with an admission therapist today to embark on your path to recovery immediately.

Get Started

Contact Us Today

info@robinrecovery.com
(888) 586-7168
3616 E Main St, Whitehall, OH 43213
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.