The following command results in a successful form addition but when editing the form fields in the WP admin, the fields' details don't expand.
WP-CLI command: wp gf form create --form-json='FORM_JSON_GOES_HERE'
When trying to expand a field in the admin panel the following error is printed to the console:
TypeError: form.fields[b] is null
This is due to the inputs in my JSON not including field IDs.
Example field in my JSON (this doesn't work):
{
"type": "text",
"label": "Name",
"defaultValue": "",
"visibility": "visible",
"isRequired": true,
"size": "large"
},
When I add IDs manually to the import, the form functions correctly:
{
"type": "text",
"label": "Name",
"defaultValue": "",
"visibility": "visible",
"isRequired": true,
"size": "large",
"id": 1
},
Requested change
Would it be possible to auto-assign consecutive field IDs on import?
Environment
WP Version: 4.9.8
GF Version: 2.3.4.3
GF-CLI Version: 1.0