Two early church fathers (Ignatius and Polycarp) were students of John the apostle. Someone wrote that one of them wrote that John was unhappy with missing details of the previous gospels, motivating him to write his gospel. I've been trying to find this reference in their writings.
Not aware of the idea that John wrote his gospel because the other three needed added details, but there is the thought that John wrote for more "light" on certain general matters. These are from Irenaeus, a disciple of Polycarp, a disciple of John.
- In a still clearer light has John, in the Apocalypse, indicated to the Lord’s disciples what shall happen in the last times, and concerning the ten kings who shall then arise, among whom the empire which now rules [the earth] shall be partitioned. Irenaeus AH V XXVI
Irenaeus in AH III XI does argue that the gospels must be 4 in number and does outline why John's gospel is so important.
- John, the disciple of the Lord, preaches this faith, and seeks, by the proclamation of the Gospel, to remove that error which by Cerinthus had been disseminated among men, and a long time previously by those termed Nicolaitans, who are an offset of that “knowledge” falsely so called, that he might confound them, and persuade them that there is but one God, -AH III XI-
As the OP mentions, John taught Polycarp and Polycarp taught Irenaeus. Here is an example.
TO EDIT TO INCLUDE EUSEBIUS' EXPLANATION (mentioned in another answer)
- And when Mark and Luke had already published their Gospels,762 they say that John, who had employed all his time in proclaiming the Gospel orally, finally proceeded to write for the following reason. The three Gospels already mentioned having come into the hands of all and into his own too, they say that he accepted them and bore witness to their truthfulness; but that there was lacking in them an account of the deeds done by Christ at the beginning of his ministry.763
- And this indeed is true. For it is evident that the three evangelists recorded only the deeds done by the Saviour for one year after the imprisonment of John the Baptist,764 and indicated this in the beginning of their account.
- For Matthew, after the forty days’ fast and the temptation which followed it, indicates the chronology of his work when he says: “Now when he heard that John was delivered up he withdrew from Judea into Galilee.”765
- Mark likewise says: “Now after that John was delivered up Jesus came into Galilee.”766 And Luke, before commencing his account of the deeds of Jesus, similarly marks the time, when he says that Herod, “adding to all the evil deeds which he had done, shut up John in prison.”767
- They say, therefore, that the apostle John, being asked to do it for this reason, gave in his Gospel an account of the period which had been omitted by the earlier evangelists, and of the deeds done by the Saviour during that period; that is, of those which were done before the imprisonment of the Baptist. And this is indicated by him, they say, in the following words: “This beginning of miracles did Jesus”;768 and again when he refers to the Baptist, in the midst of the deeds of Jesus, as still baptizing in Ænon near Salim;769 where he states the matter clearly in the words: “For John was not yet cast into prison.”770
- John accordingly, in his Gospel, records the deeds of Christ which were performed before the Baptist was cast into prison, but the other three evangelists mention the events which happened after that time. -source-
Where is the reference to John's student writing that John wrote his gospel because the synoptic gospels needed more detail?
I truly do not believe that there exists such a direct reference to such a statement by either St. Ignatius of Antioch or St. Polycarp of Smyrna, disciples of St. John the Apostle and Evangelist.
It remains obvious that St. John wrote his Gospel last and added details that the other Evangelists did not.
Besides St. John was aware that heresies were starting and thus saw a need for more details in his Gospel that we’re missing in the synoptic Gospels.
John, the disciple of the Lord, preaches this faith, and seeks, by the proclamation of the Gospel, to remove that error which by Cerinthus had been disseminated among men, and a long time previously by those termed Nicolaitans, who are an offset of that knowledge falsely so called, that he might confound them, and persuade them that there is but one God, who made all things by His Word; and not, as they allege, that the Creator was one, but the Father of the Lord another; and that the Son of the Creator was, forsooth, one, but the Christ from above another, who also continued impassible, descending upon Jesus, the Son of the Creator, and flew back again into His Pleroma; and that Monogenes was the beginning, but Logos was the true son of Monogenes; and that this creation to which we belong was not made by the primary God, but by some power lying far below Him, and shut off from communion with the things invisible and ineffable. The disciple of the Lord therefore desiring to put an end to all such doctrines, and to establish the rule of truth in the Church, that there is one Almighty God, who made all things by His Word, both visible and invisible; showing at the same time, that by the Word, through whom God made the creation, He also bestowed salvation on the men included in the creation; thus commenced His teaching in the Gospel: In the beginning was the Word, and the Word was with God, and the Word was God. The same was in the beginning with God. All things were made by Him, and without Him was nothing made. What was made was life in Him, and the life was the light of men. And the light shines in darkness, and the darkness comprehended it not. John 1:1, etc. All things, he says, were made by Him; therefore in all things this creation of ours is [included], for we cannot concede to these men that [the words] all things are spoken in reference to those within their Pleroma. For if their Pleroma do indeed contain these, this creation, as being such, is not outside, as I have demonstrated in the preceding book; but if they are outside the Pleroma, which indeed appeared impossible, it follows, in that case, that their Pleroma cannot be all things: therefore this vast creation is not outside [the Pleroma]. - Against Heresies (Book III, Chapter 11)
This is due to the fact he wrote his Gospel decades later than the authors of the synoptic Gospels, St. John had time reflect on points he thought should be added as he was privileged as being an eyewitness. Two of the Evangelists were not even Apostles. Some of the scenes that St. John mentioned in the Gospel were one’s where he was the only Apostle to mention details that may have gone unnoticed. He was for example to witness the Crucifixion of his Lord, while the other fled in terror. Subsequently, John had much time reflect on what his Gospel should include. For him this was important, otherwise he would not include some information that the others did not.
Passing over the intimate circumstances with which early legend has clothed the composition of the Fourth Gospel, we shall discuss briefly the time and place of composition, and the first readers of the Gospel.
As to the date of its composition we possess no certain historical information. According to the general opinion, the Gospel is to be referred to the last decade of the first century, or to be still more precise, to 96 or one of the succeeding years. The grounds for this opinion are briefly as follows:
the Fourth Gospel was composed after the three Synoptics;
it was written after the death of Peter, since the last chapter - especially xxi, 18-19 presupposes the death of the Prince of the Apostles;
it was also written after the destruction of Jerusalem and the Temple, for the Evangelist's references to the Jews (cf. particularly xi, 18; xviii, 1; xix, 41) seem to indicate that the end of the city and of the people as a nation is already come;
the text of xxi, 23, appears to imply that John was already far advanced in years when he wrote the Gospel;
those who denied the Divinity of Christ, the very point to which St. John devotes special attention throughout his Gospel, began to disseminate their heresy about the end of the first century;
finally, we have direct evidence concerning the date of composition. The so-called "Monarchian Prologue" to the Fourth Gospel, which was probably written about the year 200 or a little later, says concerning the date of the appearance of the Gospel: "He [sc. the Apostle John] wrote this Gospel in the Province of Asia, after he had composed the Apocalypse on the Island of Patmos". The banishment of John to Patmos occurred in the last year of Domitian's reign (i.e. about 95). A few months before his death (18 September, 96), the emperor had discontinued the persecution of the Christians and recalled the exiles (Eusebius, Church History III.20.5-7). This evidence would therefore refer the composition of the Gospel to A.D. 96 or one of the years immediately following.
The place of composition was, according to the above-mentioned prologue, the province of Asia. Still more precise is the statement of St. Irenaeus, who tells us that John wrote his Gospel "at Ephesus in Asia" (Against Heresies III.1.2). All the other early references are in agreement with these statements.
The first readers of the Gospel were the Christians of the second and third generations in Asia Minor. There was no need of initiating them into the elements of the Faith; consequently John must have aimed rather at confirming against the attacks of its opponents the Faith handed down by their parents.
St. Irenaeus makes the following admission:
We have learned from none others the plan of our salvation, than from those through whom the Gospel has come down to us, which they did at one time proclaim in public, and, at a later period, by the will of God, handed down to us in the Scriptures, to be the ground and pillar of our faith.** For it is unlawful to assert that they preached before they possessed perfect knowledge, as some do even venture to say, boasting themselves as improvers of the apostles. For, after our Lord rose from the dead, [the apostles] were invested with power from on high when the Holy Spirit came down [upon them], were filled from all [His gifts], and had perfect knowledge: they departed to the ends of the earth, preaching the glad tidings of the good things [sent] from God to us, and proclaiming the peace of heaven to men, who indeed do all equally and individually possess the Gospel of God. Matthew also issued a written Gospel among the Hebrews in their own dialect, while Peter and Paul were preaching at Rome, and laying the foundations of the Church. After their departure, Mark, the disciple and interpreter of Peter, did also hand down to us in writing what had been preached by Peter. Luke also, the companion of Paul, recorded in a book the Gospel preached by him. Afterwards, John, the disciple of the Lord, who also had leaned upon His breast, did himself publish a Gospel during his residence at Ephesus in Asia.
- These have all declared to us that there is one God, Creator of heaven and earth, announced by the law and the prophets; and one Christ the Son of God. If any one do not agree to these truths, he despises the companions of the Lord; nay more, he despises Christ Himself the Lord; yea, he despises the Father also, and stands self-condemned, resisting and opposing his own salvation, as is the case with all heretics.
The "student of John" you have in mind is most likely Papias. Eusebius quotes (probably at second hand) the statements of Papias about the composition of the Gospels of Matthew and Mark, and there are grounds to think that his analogous statements about Luke and John have been handed down elsewhere without attribution.
Now, Eusebius, Hist. Eccl. 3.24.7 says this:
And when Mark and Luke had already published their Gospels, they say that John, who had employed all his time in proclaiming the Gospel orally, finally proceeded to write for the following reason. The three Gospels already mentioned having come into the hands of all and into his own too, they say that he accepted them and bore witness to their truthfulness; but that there was lacking in them an account of the deeds done by Christ at the beginning of his ministry.
Eusebius is no more specific than "they say", but some scholars (notably Hill) have argued that his unspecified source was Papias. If correct (though I don't think it is), this would mean that Papias, a disciple of John, reported this.
There's also the thorny question of whether the "John the Elder" (cf. 2 John 1:1) whom Papias cites is identical with John the Evangelist (as Irenaeus affirms but Eusebius doubts) and/or John the son of Zebedee, but I digress.