Update entry with new upload files


I’m looking for an idea to solve a problem I have concerning the import of a file from an entry into a new entry.

I explain:
Customers fill in a problem report in an A form.
If the request is legitimate, I get the value of the entry A with url parameters
( https://webe.site/?description=test&id_demande_externe=841&lieu_gps={"type":"Feature","properties":{},"geometry":{%22type%22:%22Point%22,%22coordinates%22:[4.839917,45. 7693]}}&problem_1=PROTECTION%20CIVILE&problem_2=Other&problem_3=&location_1=&location_2=&location_3=&origin=D%C3%A9declaration%20on%20line ) to dynamically fill in some fields of a form B. In my example, the id of entry 1, GPS information, description …

My problem is that in form A I have files (photo, pdf, …) that I want to pass to form B. I have no idea how I can get the images from form A to B because on the multiple upload queues you can’t add parameters.

So I imagined to update entry with the hook gform_post_submission of form B but i don’t see how GFAPI::update_entry_field() work with files fileds.

I am interested in ideas.

Thank you and have a nice day,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

This sounds like a scenario where the Gravity Flow Form Connector plugin would be of use to you. Your Form A would have a workflow with the Create an Entry step that would map the fields you are currently using url parameters to handle including the file uploads.

An added benefit would be that with a user input step as the first activity within the Form B workflow, you could differentiate between fields that the assignee should only be able to see (display fields - of the ones mapped from form A) or ones they should edit (unique to form B).

If you needed to do something more complex (change specific values during the mapping process), the gravityflowformconnector_new_entry filter shows some examples.


1 Like