As Seen On

Recognized By
Featured Answer
Why Pre-Charge Sex Crime Investigations Move So Quietly
If you are under investigation for a sex crime in Scottsdale — a detective called, a family member said police came by, or you heard an allegation is circulating — say nothing about the allegation, sign nothing, and do not agree to any recorded call, interview, or phone search until a defense lawyer is involved. Pre-charge investigations often run for weeks before an arrest, and almost everything you say or hand over during that window becomes evidence used to charge you, not to clear you.

Most people picture a sex-crime case starting with handcuffs. In Scottsdale, it usually starts much quieter than that — a voicemail from a detective, a text asking you to “clear up a misunderstanding,” or a relative mentioning that police stopped by asking about you. Nothing about that first contact feels like an emergency. That is the problem. By the time a detective reaches out, an allegation has usually already been reported, and Scottsdale Police Department’s Special Victims Unit has already started building a file. The quiet phase is not a formality before the real investigation — it is the investigation, and it is where most sex-crime cases are actually won or lost.
This article is written for the moment you are in right now: no arrest, no charge, but a real reason to believe you are being looked at for a sex offense. For the broader picture of how these cases proceed once charges are filed, see our Scottsdale sex crimes defense page. If the allegation stems from a bar or club encounter, our Scottsdale nightclub sexual assault page covers that narrower fact pattern. And if you have already been asked to come in for questioning on any charge, read what it means when Scottsdale police want to question you before you respond to anyone.
Detectives investigating a sexual assault allegation are not required to arrest you the moment a report is made, and in Scottsdale they almost never do. Instead, a Special Victims Unit detective typically spends days or weeks quietly building a case before deciding whether to seek charges through the Maricopa County Attorney’s Office. During that window, a detective may:
- Interview the accuser multiple times and take a recorded statement;
- Pull phone records, location data, social media messages, and dating-app history;
- Canvass friends, roommates, or coworkers who saw you together;
- Obtain hospital or SANE exam records if one was completed;
- Reach out to you — by phone, text, or a knock at your door — to get your version on the record.
That last step catches people off guard. A detective calling to “hear your side” sounds like a chance to clear your name. In practice, it is usually the final piece the state wants before deciding whether to file. Anything you say gets written into a report, and unlike a normal conversation, it cannot be taken back or clarified later once it is memorialized as your statement to law enforcement.
What Is a “Confrontation Call” — and Why It Is So Dangerous
One of the most common tools in a Scottsdale sex-crime investigation is the confrontation call, sometimes called a pretext call. A detective has the accuser place a call to you — often from the police station, recorded — and steer the conversation toward an apology or any statement that sounds like an admission. The accuser may say things like “why did you do that to me,” hoping you respond with an apology, an excuse, or a detail that confirms the allegation.
Arizona is a one-party-consent state for recording conversations under A.R.S. 13-3005 — the accuser, as a participant, can legally record the call and hand it to police without your knowledge. You do not have to be told it is being recorded. If you get an unexpected, emotionally charged call from an accuser out of nowhere, especially one that seems designed to get you talking about the incident, treat it as a law enforcement tool, because that is almost certainly what it is.
Saying “I’m sorry, I was drunk,” explaining your version of events, or getting defensive and describing “what really happened” can all be twisted into evidence of guilt — you have confirmed the encounter and reacted to specific accusations in real time, with no lawyer, no idea what the accuser already told police, and no way to correct the record later.
Why You Should Never Talk to the Detective Without a Lawyer
Every person has a constitutional right to remain silent and a right to an attorney before answering police questions, and in a pre-charge sex-crime investigation, exercising both is not optional — it is the single most protective thing you can do. A detective who calls asking you to “come in and talk” is not offering a chance to clear your name. Detectives are trained interviewers whose job is to gather statements that support the case, and the law allows them to use deception or suggest that talking will help you, none of which is illegal for them to do.
There is no version of a pre-charge interview where talking makes your position better. If your account matches the allegation in any way, you have confirmed elements of the offense. If it differs from what the accuser said, you have created an “inconsistent statement” a prosecutor can use to attack your credibility, even where the difference is trivial or entirely truthful. The only safe response is a polite, firm decline paired with a request that all future contact go through your attorney.
Can They Search My Phone or Devices?
Not without either a warrant or your voluntary consent — and pre-charge, detectives frequently ask for consent because it is far easier to obtain than a warrant. An officer or detective may ask you to “unlock your phone real quick” or “let us take a look to clear things up.” You are under no obligation to agree, and you should not. Consenting to a phone search hands over text messages, dating-app conversations, location history, photos, and search history — all of which can be combed for anything that supports the allegation, regardless of whether it has anything to do with the specific incident under investigation.
If detectives believe they have probable cause, they can apply for a search warrant for your phone, cloud accounts, or other devices without your permission. That process takes time and requires a judge to sign off, which is precisely why many detectives try consent first. Politely declining consent to a device search, and directing any request for a warrant application to your attorney, is not an admission of guilt — it is exercising a Fourth Amendment right that exists for exactly this situation.
What Is Actually at Stake in a Sex Crime Investigation
People sometimes minimize a pre-charge investigation because no charge has been filed yet. The stakes are a major reason to take it seriously from the first phone call. Under A.R.S. 13-1406, sexual assault — intentionally or knowingly engaging in sexual intercourse or oral sexual contact without consent — is a class 2 felony, one of the most serious felony classes in Arizona, not eligible for probation or a suspended sentence. A first offense alone can carry a presumptive sentence measured in years.
Beyond prison exposure, many sex offenses carry mandatory sex-offender registration under A.R.S. 13-3821, which for most qualifying offenses is a lifetime requirement — affecting where you can live, work, and travel, publicly searchable long after any sentence is served. That combination is why the pre-charge stage deserves the same urgency as an actual arrest, not less.
The Stakes at a Glance
A.R.S. 13-1406 — Sexual Assault · A.R.S. 13-3821 — Registration
Who Investigates, Who Prosecutes
Scottsdale Police Department, typically through its Special Victims Unit, investigates sex-crime allegations arising within city limits. But felony sex offenses are not filed or prosecuted by the city — they are charged by the Maricopa County Attorney’s Office and heard in Maricopa County Superior Court. Scottsdale City Court has no jurisdiction over felony sex crimes. The detective calling you is building an investigative file, but the decision to charge, and the courtroom where the case would be heard, sits at the county level. That split is why a detective’s own promises or predictions carry no real weight — charging decisions come from prosecutors reviewing the file, often weeks after your last contact with police.
What to Do — and What Not to Do — Right Now
If you believe you are under investigation, the decisions you make in the next few days matter more than almost anything that happens later in the case.
Do
- Contact a criminal defense attorney immediately, before responding to any detective, accuser, or mutual acquaintance;
- Write down, privately, everything you remember about the encounter and any contact with police, dated and detailed, for your attorney only;
- Preserve your own phone, messages, and any relevant photos exactly as they are — do not delete anything;
- Identify anyone with relevant knowledge and give that list to your attorney, not to the witnesses directly;
- Let your attorney be the point of contact for any detective, prosecutor, or investigator going forward.
Do Not
- Do not call, text, or agree to meet with the accuser to “talk it out” or apologize for anything;
- Do not answer a detective’s call or text, or agree to an interview without counsel present;
- Do not consent to a search of your phone, car, or home;
- Do not post about the situation on any social media;
- Do not delete texts or photos — that can be charged separately as evidence tampering;
- Do not contact witnesses yourself to get their “story straight” — that risks witness tampering.
Protecting Evidence Before Charges Are Ever Filed
The pre-charge window is also the best opportunity to preserve evidence that helps you, before it disappears. Text messages and social media exchanges that show context, consent, or timeline are often still recoverable in the days after an incident but can be lost or overwritten as time passes. Surveillance video, rideshare records, and cell-site location data all sit on retention schedules controlled by third parties, not by you. An attorney can send preservation letters and retain investigators to secure this evidence early — far harder to do well after a charge is filed and the state already has a head start.
The Experts We Bring to Pre-Charge Sex Crime Investigations
Winning at this stage is about controlling the file before it is finished — the digital evidence, the psychology of the allegation, and the record you build before a prosecutor ever sees it. We work with specialists who operate on that timeline.
Digital & Phone Forensics Experts
What Your Devices Actually Show
Independently examine texts, dating-app logs, location data, and metadata to establish timeline and context before we ever consider what a prosecutor’s own examiner might claim about your devices.
False-Allegation & Psychology Consultants
Why Allegations Get Made
Assess motive, memory, suggestion, and the psychology behind an accusation — including how confrontation calls and repeated interviews can shape a story over time.
Polygraph Consultants
A Confidential Diagnostic Tool
Coordinate confidential, attorney-directed polygraph examinations that can inform defense strategy and, in some cases, support pre-charge negotiations with the state.
Private Investigators
Securing Evidence First
Move quickly to interview available witnesses, pull surveillance and rideshare records, and preserve time-sensitive evidence before it is lost, overwritten, or forgotten.
Pretrial Mitigation Specialists
Building Your Record Early
Assemble character, employment, and treatment records before any charging decision is made — materials that can influence whether a county attorney charges at all, or what is offered if they do.
Mitigation Specialists
The Whole Person, Documented
Build the personal, medical and work history that reshapes charging and sentencing decisions.
How Tamou Law Group Handles Pre-Charge Sex Crime Investigations
The moment you call us, we take over communication with the detective — every future call or request to “come in” gets redirected to our office, not to you. We advise you on preserving evidence, decline any consent to search phones or devices on your behalf, and evaluate whether a confrontation call has already occurred so we know exactly what the state may have. Where it makes sense, we retain investigators to secure surveillance and digital evidence before it disappears, and we begin building the record — character, employment, context — that can matter if the case reaches the Maricopa County Attorney’s Office for a charging decision.
Our team includes former prosecutors, law enforcement officers, and public defenders who have sat on every side of a Special Victims Unit investigation and know how charging decisions actually get made. Acting before charges are filed is often the single best opportunity to change the outcome of a sex-crime case. Call 623-321-4699 for a confidential consultation, or read more on our Scottsdale sex crimes defense page and our guide to Scottsdale criminal defense. If an arrest has already happened, our guide to what happens after a Scottsdale arrest explains the next steps.
Award-Winning Criminal Defense Law Firm
When you are looking for the best Phoenix sex crime lawyers, these are the independently verified credentials that matter, earned by Founding Attorney Michael Tamou and a full team of attorneys, including former prosecutors, public defenders, and law enforcement.
Client reviews
What our clients say
I highly recommend Michael Tamou! He recently handled my GCE application, and I couldn't be more grateful for his help. From the very beginning, Michael was incredibly professional, knowledgeable, and thorough in making sure everything was completed perfectly. What stood out the most was his compassion—legal processes can be highly stressful, but he treated me with genuine care, kept me informed, and made me feel completely supported throughout. If you need a dedicated and skilled attorney who truly cares about his clients, look no further than Michael Tamou.
DMDan MillerGoogle review · Oct 2026Michael Tamou is an exceptional attorney! Facing a case that could affect my future was incredibly stressful, but from our first conversation, he provided honest guidance, reassurance, and a clear plan. He immediately got to work, personally reviewing the evidence and reports, filing the necessary motions, and keeping me informed throughout the process. His expertise, persistence, and genuine care gave me confidence that my case was in capable hands. I’m incredibly grateful that Michael achieved the outcome I had hoped and prayed for: my case was dismissed. I highly recommend him to anyone seeking a skilled, dedicated, and caring attorney.
TJTammy JohnsonGoogle review · Sep 2026I had a great experience working with Michael. From the beginning, they were professional, knowledgeable, and responsive. They took the time to explain everything clearly, kept me informed throughout the process, and always had my best interests in mind. Their dedication and attention to detail gave me confidence during a stressful time, and they achieved a positive outcome for my case. I truly appreciate their hard work and would highly recommend them to anyone looking for an experienced and trustworthy attorney. Thank so much Tamou Law Group.
AAAlejandra ArevaloGoogle review · Aug 2026This is a great group of attorneys that work together!! There’s no other law firm I’d use for any situation. They put the time and effort into helping out any way they can. Mike and Kristie were both amazing in handling my situation and being transparent during the whole process.
TTJ2KGoogle review · Nov 2026I can’t thank Tamou Law Group enough for helping me with my case. They truly went above and beyond, and I’m incredibly grateful for their hard work, dedication, and support. Having a team in your corner that cares makes all the difference during a stressful time. Five stars don’t feel like enough! I highly recommend them to anyone looking for a law firm that will go the extra mile. Thank you for everything!
EGEvan GibraelGoogle review · Oct 2026I cannot recommend Ms. Jacie Cotterell highly enough. From start to finish, she was absolutely amazing throughout the entire process. She was professional, knowledgeable, and always took the time to answer my questions and explain everything clearly, which gave me a lot of peace of mind during a stressful situation. What stood out most was how genuinely caring and dedicated she was. I always felt like she had my best interests at heart, and her communication was excellent every step of the way. She made a difficult experience much easier to navigate and was always patient, supportive, and reassuring. I am incredibly grateful for all of her hard work and guidance. If you’re looking for someone who is compassionate, trustworthy, and truly committed to helping her clients, I wholeheartedly recommend Ms. Jacie Cotterell. Thank you again for everything, wyou made a lasting positive impact, and I truly appreciate all that you did.
BPBlaze PeralesGoogle review · Aug 2026Michael is hands down the best in the business. The day I called him he explained everything about my daughter’s situation and took the time to research the charges. He then gave me a price and gave me a chance to think it through before hiring him and two weeks later we retained his services. Michael went to work at that point with his team and brought results that no one else could do. My daughter now has a second chance to get her life on track over a few costly mistakes that could have landed her in prison and with a felony record but Michael did not allow that to happen. If you need solid representation that fights for you then hire Michael.
RHrob hardeeGoogle review · Aug 2026Kristie & Mike didn’t just see me as another client but as a person in need of help. The level of professionalism & communication going through my whole case made me feel at peace. Amazing lawyers & 10/10 would recommend!
DNDanny NguyenGoogle review · Oct 2026We {Carrie & Ted S.} are very pleased that we chose Mike Tamou Law Group to represent a criminal case that was against our granddaughter. The case against her was for two different ordeals, and in both situations - the cases were handled above & beyond what we expected. Because of Mike's quickness and professionalism, both situations were resolved in an expedited manor with positive results that we were extremely pleased with. Our granddaughter is also extremely pleased with the results. We would recommend {Mike} Tamou Law Group to anybody that is seeking legal advice in a criminal situation.
TSTed SchroederGoogle review · Jul 2026I had an aggravated DUI case class 4 felony. With an extensive criminal record of 7 prior felonies. Mr. Tamou did an outstanding job on my case, he got me the least possible amount of time. He got the prosecutor not to allege any of my priers. I did just 4 months with a probation tail. Other lawyers I spoke with prior to retaining M. Tamou, told me the best they could get, would be a few years in prison, due to my extensive criminal history. Michael said he would fight for me and he delivered. He has relationships with the prosecutors and judges and is a great negotiator. Also he was great with communicating with me throughout the process. Always returned my calls and text messages and kept me informed. I highly recommend him.
PGPaul GonzalezGoogle review · May 2026I had a great experience with Tamou Law! Michael was very helpful. He took the time to explain everything in a way that was easy for me to understand, which made the entire process feel much less overwhelming. He was patient, professional, and always made sure I felt informed and comfortable with each step. I truly appreciated his communication and support throughout! HIGHLY RECOMMEND!
SSandraGoogle review · Apr 2026Michael is truly amazing. I am so happy that I chose him to help me with my legal situation. He is completely trustworthy. Michael was completely transparent and honest throughout the entire process and offered support to me like I was his own family member. He was patient and understanding and prompt in responding to any of my inquiries during my waiting period. His explanations were clear and logical, and I felt beyond comfortable with him. I really appreciate him and the staff in his practice, and I highly recommend him for anyone's legal needs!! Thank you, Michael! You're really the best. I appreciate you!
RLRochelle LeeGoogle review · Feb 2026Our family went through the worst time of our lives! It was wonderful to have Michael on our side fighting for us and giving us the advice we needed to take the right steps. Case Dismissed! Thank you for your hard work, dedication, and support.
RERussell EllisGoogle review · Aug 2026He's the Greatest lawyer we could have ever asked for he put his heart into helping us and we came out with exactly what we wanted! I highly recommend him!
JOJose OrtizGoogle review · Oct 2026⭐️⭐️⭐️⭐️⭐️ I cannot thank Mike Tamou enough for what he did for my family. My son was facing serious charges that could have changed the course of his life forever. From the very beginning, Mr. Tamou treated us with compassion, respect, and honesty. He took the time to explain every step of the process, always making sure we understood what was happening and what to expect. His professionalism and dedication were unmatched. He worked tirelessly on my son’s case, exploring every possible option and fighting for the best outcome. Because of Mike’s skill, expertise, and determination, my son was saved from going to jail and now has the opportunity to move forward and rebuild his life. I am forever grateful for his hard work and would highly recommend Mike Tamou to anyone in need of a strong, knowledgeable, and caring defense attorney. He doesn’t just represent his clients—he truly fight for them.
EHErin HernandezGoogle review · 2025Michael did an amazing job helping my loved one with his case. He was the first call I made and I knew right then how much he truly cared for his clients. I highly recommend Tamou Law to anyone who reads this review. Michael worked extremely hard for us and exceeded my expectations of the outcome. He is compassionate, very knowledgeable, experienced, respected and very fair. He always took the time to take my calls and to listen to questions that we had. He works hard for his clients and is the kind of guy you want on your side. Thanks again Michael. You were a pleasure to work with.
LBLaurie BryantGoogle review · 2024Great experience from start to finish. Professional, responsive, and made a stressful situation much easier. I felt confident the whole time and really appreciated Michael’s support. Highly recommend!
SMShivraj MannGoogle review · Apr 2026Had a situation that Michael helped me through with the best possible outcome. Very responsive and actually cares about his clients.
CJCaleb JohnsonGoogle review · Aug 2026My son was an idiot and was in serious trouble. He was facing prison time. Fortunately, we were referred to Tamou Law Group by trusted friends and we are beyond grateful that we listened. From the onset, Michael helped to put our family at ease. We discussed the charges where Mike provided insight that helped adjust our expectations. Sure enough, it played out nearly exactly like Mike predicted. Mike put a strong case together – which resulted with no jail time! If you find yourself in need of legal representation, you should hire Michael Timou!
AHArmando HernandezGoogle review · 2025I can’t recommend Tamou law group enough. From day one, Micheal took the time to really listen, explained my options in a way that actually made sense, and built a strong strategy that put my mind at ease. The entire team was professional, responsive and genuinely caring throughout the whole process. They fought tirelessly and delivered a result that far exceeded my expectations. If you need a law firm you can trust completely, this is it. Thank you!
BKBryan KingGoogle review · Dec 2025
Why Tamou Law Group for Sex Crime Charges
A sex-crime allegation is usually one account against another, and the State files first and investigates second. We treat these cases as evidence cases from day one: digital records, forensic interviews, timelines and the gaps between them.
A dismissal on the hardest charge
Our published results include a sexual assault and sexual abuse case dismissed after extensive litigation, and reductions on luring, sexual conduct with a minor, molestation and sexual exploitation charges. These are the cases most firms plead early.
Former prosecutors who charged these cases
Attorneys on our team have worked inside the offices that file sex-crime charges in Arizona. They know how forensic interviews are scored, what a detective needs before a confrontation call, and which weaknesses the State hopes you never notice.
Pre-charge defense
Sex-crime cases often begin with a detective’s call, before any charge exists. That window is where a case is declined, downgraded or filed as alleged, and we have handled that stage from both sides of the table.
Published results in this area
| Case | Charges | Outcome |
|---|---|---|
| State v. W.N. | Sexual assault and sexual abuse (A.R.S. 13-1406, 13-1404) | Case dismissed |
| State v. P.J. | Sexual abuse and indecent exposure (13-1404, 13-1402) | Reduced charge |
| State v. N.D. | Luring a minor and attempt (13-3554, 13-1001) | Reduced charge |
| State v. L.B. | Sexual conduct with a minor and attempt (13-1405, 13-1001) | Reduced charge |
| State v. H.V. | Molestation of a child and sexual abuse (13-1410, 13-1404) | Reduced charge |
| State v. V.R. | Sexual exploitation of a minor (13-3553) | Reduced charge |
| State v. G.D. | Indecent exposure and disorderly conduct (13-1402, 13-2904) | Deferred prosecution |
Anonymized outcomes from our case results page. Every case is different; past results do not guarantee a future outcome.
Frequently Asked Questions
What should I do if I’m under investigation for a sex crime in Scottsdale?
Say nothing about the allegation to police, the accuser, or witnesses, and do not consent to any search of your phone or devices. Call a criminal defense attorney immediately so all future contact with detectives goes through counsel instead of directly to you. Pre-charge investigations can run for weeks, and this early period is often the best chance to affect whether charges are filed at all.
A detective called me about a sexual assault allegation — what does that mean?
It means Scottsdale Police Department has already received a report and is building an investigative file to send to the Maricopa County Attorney’s Office for a charging decision. The call is not an opportunity to clear your name — it is typically the final piece of information a detective wants before deciding whether to recommend charges. Do not respond without an attorney.
What is a confrontation call in a sex crime investigation?
A confrontation call, or pretext call, is when police have the accuser call you — often from the police station, recorded — and try to steer the conversation toward an apology or admission. Arizona is a one-party-consent recording state under A.R.S. 13-3005, so the accuser can legally record the call and give it to police without telling you. Do not engage; hang up or do not respond, and call a lawyer.
Should I talk to police to clear up a sexual assault allegation?
No. Detectives are trained to gather statements that support a case, and any account you give — even a truthful one — can be used against you if it confirms any element of the allegation or differs in any way from what the accuser said. The constitutional right to remain silent and to have an attorney present exists precisely for this situation. Politely decline and direct police to your lawyer.
Can police search my phone without a warrant?
Not without your voluntary consent. Detectives often ask you to unlock your phone or “take a quick look” because it is far easier than obtaining a warrant from a judge. You are not required to agree, and declining is not evidence of guilt — it is exercising your Fourth Amendment rights. If police believe they have probable cause, they can seek a warrant, and your attorney can respond to that process.
Should I get a lawyer before I’m charged with a crime?
Yes, especially in a sex-crime investigation. Sexual assault under A.R.S. 13-1406 is a non-probationable class 2 felony, and many sex offenses carry lifetime registration under A.R.S. 13-3821, so the stakes are severe before any charge is even filed. The pre-charge stage is often the best opportunity to preserve evidence, avoid self-incriminating statements, and potentially influence whether the Maricopa County Attorney’s Office files charges at all.
How long do pre-charge sex crime investigations take in Arizona?
It varies widely, but Scottsdale Special Victims Unit investigations frequently take weeks, sometimes longer, while detectives gather statements, phone records, and other evidence before submitting the file to the Maricopa County Attorney’s Office for a charging decision. There is no fixed deadline that forces a quick resolution, which is exactly why the waiting period should be used to build your defense, not ignored.
Will I go to jail immediately if I’m under investigation?
Usually not. Being investigated is not the same as being arrested or charged, and Scottsdale detectives frequently complete their investigation and submit it for a charging decision before any arrest occurs. That said, an arrest can happen at any point once probable cause exists, which is another reason to have a defense attorney involved before that happens rather than after.
Two Arizona Offices, One Team
We serve all of Maricopa County and the surrounding area, with free, confidential consultations 24/7 by phone and in-person meetings at either office by appointment.
Case Results Disclaimer: The results described on this page are based on specific facts and circumstances and do not guarantee or predict a similar outcome in any future case. Every case is different. Past results do not guarantee future results. No attorney-client relationship is formed by viewing this page or submitting a contact form until a written fee agreement has been signed. Tamou Law Group, PLLC is licensed to practice law in the State of Arizona. This website is for informational purposes only and does not constitute legal advice.
(function() {
function customizeConsultForm() {
var form = document.querySelector('#consult-form');
if (!form) return false;
var fields = form.querySelectorAll('.gfield');
var emailField = null;
var didWork = false;
fields.forEach(function(field) {
var label = field.querySelector('.gfield_label, label');
if (!label) return;
var labelText = (label.textContent || '').trim().toLowerCase();
if (labelText.indexOf('best way to reply') !== -1 || labelText.indexOf('preferred contact') !== -1) {
field.classList.add('tlg-hide-field');
field.querySelectorAll('input').forEach(function(input) {
input.checked = false;
input.removeAttribute('required');
});
didWork = true;
}
if (labelText.indexOf('email') !== -1) {
emailField = field;
field.classList.add('tlg-email-required');
field.querySelectorAll('input[type="email"], input[type="text"]').forEach(function(input) {
input.setAttribute('required', 'required');
input.setAttribute('aria-required', 'true');
});
didWork = true;
}
});
var gform = form.tagName === 'FORM' ? form : (form.querySelector('form') || form.closest('form'));
if (!gform) gform = document.querySelector('#consult-form form, form[id^="gform_"]');
if (gform && !gform.dataset.tlgSourceBound) {
gform.dataset.tlgSourceBound = '1';
var pageUrl = window.location.href;
var pageTitle = document.title || 'Phoenix White Collar Defense Lawyers';
var pagePath = window.location.pathname;
var sourceTag = '[Source: ' + pageTitle.replace(/\s*[,|].*$/, '') + ' | ' + pagePath + ']';
['source_page', 'page_url', 'lander_url'].forEach(function(name) {
var h = document.createElement('input');
h.type = 'hidden';
h.name = name;
h.value = pageUrl;
gform.appendChild(h);
});
var hp = document.createElement('input');
hp.type = 'hidden';
hp.name = 'source_path';
hp.value = pagePath;
gform.appendChild(hp);
function findMessageField() {
var match = null;
form.querySelectorAll('.gfield').forEach(function(field) {
var label = field.querySelector('.gfield_label, label');
if (!label) return;
var t = (label.textContent || '').trim().toLowerCase();
if (t.indexOf('message') !== -1 || t.indexOf('comment') !== -1 || t.indexOf('detail') !== -1 || t.indexOf('describe') !== -1 || t.indexOf('tell us') !== -1 || t.indexOf('your story') !== -1) {
match = field.querySelector('textarea, input[type="text"]');
}
});
if (!match) match = form.querySelector('textarea');
return match;
}
function prependSource() {
var textarea = findMessageField();
if (textarea && textarea.value.indexOf('[Source:') === -1) {
textarea.value = sourceTag + '\n\n' + (textarea.value || '');
}
}
gform.addEventListener('submit', prependSource, true);
var submitBtns = gform.querySelectorAll('input[type="submit"], button[type="submit"], .gform_button');
submitBtns.forEach(function(btn) {
btn.addEventListener('click', function() {
setTimeout(prependSource, 0);
prependSource();
}, true);
});
}
var submitBtn = form.querySelector('input[type="submit"], button[type="submit"]');
if (submitBtn && emailField && !submitBtn.dataset.tlgBound) {
submitBtn.dataset.tlgBound = '1';
submitBtn.addEventListener('click', function(e) {
var emailInput = emailField.querySelector('input[type="email"], input[type="text"]');
if (emailInput && !emailInput.value.trim()) {
e.preventDefault();
emailInput.focus();
emailInput.style.borderColor = '#c62828';
emailInput.style.boxShadow = '0 0 0 3px rgba(198,40,40,.15)';
}
});
}
return didWork;
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', customizeConsultForm);
} else {
customizeConsultForm();
}
var attempts = 0;
var interval = setInterval(function() {
attempts++;
var done = customizeConsultForm();
if (done || attempts > 10) clearInterval(interval);
}, 500);
})();







