Ed Werder examines who the Cowboys are looking at to backup Tony Romo at the quarterback position. (1:35)

The Dallas Cowboys, after losing backup quarterback Kellen Moore to a right leg fracture, are considering Nick Foles as an option but are also discussing potential trades, a league source told ESPN on Wednesday.

Foles bought his way out of his Los Angeles Rams contract last week and is an unrestricted free agent. The Cowboys discussed with the Rams their interest in trading for him but then drafted quarterback Dak Prescott.

The Cowboys have Wednesday off but probably need to add a quarterback quickly if they plan to continue giving starter Tony Romo every third day off.

Foles is represented by David Dunn, whose clients include Cowboys head coach Jason Garrett and offensive coordinator Scott Linehan.

Among the quarterbacks the Cowboys could seek in a trade are the Cleveland Browns' Josh McCown and the Tampa Bay Buccaneers' Mike Glennon.

Moore is scheduled to have surgery later Wednesday in Dallas to repair his fractured right fibula, and the prognosis is that he will miss three to four months, a league source said.