This is probably more of a php question.... I want to prefill a form with values I query from the database. So I've been reading a few examples on how to do this: http://www.gravityhelp.com/forums/topic/right-parameter-names-to-pre-populate-the-names-fields for example.
Now the filter calls a function at every field. I don't want to query the database every time I call the function. How should I structure this? Should I just look into query caching? Should I store the result in a GLOBAL and see if it exists? What would be the best approach to just having to do 1 query?