I’m using GFAPI::submit_form() to add entries. However the result is validation errors that do not appear when submitting the form normally.
The form has a few multi-input fields, such as ‘Name’ and ‘Address’. These fields only require a small subset of their inputs (e.g., I’m not using ‘Prefix’ or ‘Middle’ for the name field).
When I display the result of submit_form() I’m seeing validation errors. The errors reference the main ID of the field (i.e., they don’t specify the individual input’s id number like ‘2.6’ for ‘Last Name’; they specify just ‘2’).
I have tried adding the value ‘1’ to every sub-field that I’m not using in order to have something passed, but that didn’t work.
What am I doing wrong? How can I use submit_form() with these types of fields?
Here’s an example of the array I’m passing for parameter 2. It’s a name field that includes the “filler” values I added to try to get it to validate. My first attempt included only input_1.3 and input_1.6