Password protect function call

I have a plugin called gravity forms, which allows me to embed a form in each post as it is created thru a function.

However, I'd like to use password protect to hide that form in each post created via a function as well. Is this possible? Thank you!