Formatting a list field for GFAPI entry-Pre_submission

Ahoy to the community,

I have tried to do the utmost of digging through all of the documentation but my search has been in vain.

Is there any built in functionality that is available to the plebs that would take the $_POST or $form data available during gform_pre_submission, take a list field and correctly format and serialize so it can be used in GFAPI::create_entry().

The format I need:
a:1:{i:0;a:5:{s:7:“Company”;s:4:“asdf”;s:5:“Brand”;s:8:“asdfasdf”;s:8:“Retailer”;s:4:“asdf”;s:28:“List all claims on packaging”;s:4:“asdf”;s:36:“List all certifications on packaging”;s:4:“asdf”;}}

The format I get:

Any insights would be greatly appreciated and am never too humble to be called out on missing something obvious.

If there is nothing I can do within GF I can always build something meself.

May all your hits be crits.

Thanks for the tagging, I can no longer edit though so I will add my final question here.

Would it be better to try the gform_after_submission instead and change everything to use the submit_form() option? If this sounds viable would the list fields need to be unserialized to be passed as input_values to the submit_form() to be re-serialized? :slight_smile: