Check here - this is possible without any additional code: https://formidableforms.com/knowledgebase/automatically-populate-fields/