Since you are licensed in this state, I will take a few communication liberties; I understand that this is not your area of practice, so please let me know if I use any legalspeak with which you are unfamiliar.
To start, there is normally no reason why a grandparent who has been so active in their grandchild's life couldn't be eligible for visitation pursuant to Fam.Code 3102. It would not be "custody"; instead it would be visitation. It would also be a slam-dunk in most cases.
You could also seek custody through a probate guardianship. There are two reasons why (based on the very limited information provided) someone in your position might be a good candidate for appointment. First, guardianships may be awarded when the child's parents are unable or unwilling to provide for the emotional, psychological, and development needs of the child. Secondly, when you have someone who has essentially assumed the role of a de facto parent---providing for the physiological and psychological needs of the child--there is actually a legal presumption that a guardianship is appropriate, regardless of whether the parents are able and willing. A guardianship, as you are probably aware, awards physical and legal custody to a non-parent.
There are likely going to be local forms with whichever approach you take. I may not be able to help you with the local forms and would direct you to go through the local courthouse website or a local attorney for that information. I can help you with the judicial council forms if you so request (and let me know which approach you wish to take), and you can also collect the forms that you need through the clerk of the respective divisions in your courthouse; if you request a "custody packet" from the family court
division or a "guardianship packet" from the probate division, they will give you the basic forms needed and (usually) some simple instructions.
I understand that you may have follow-up questions. Let me know if further clarification is needed. Thank you.