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 ‘
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?