A filter fields option would be useful in the entry export command.
Not all fields might be needed in the export and it will also help reduce the processing time of the export and the file size.
When I use the CLI to update a form, none of the Workflow objects are updated.
This is and example of the command I am using:
wp gf form update 47 –path=/var/www/forms –url=https://fisherforms.sjfc.edu/registrar –file=”./Test Form with workflow-export-2021-06-13.json”
The response is ‘Success: Form updated successfully’ and changes to fields are getting updated.
Why are the workflow elements of the form ignored?
Steve
]]>When you get the options by typing wp gf form
you get the following for form edit:
wp gf form edit
This command requires a form ID as input, so the output should read:
wp gf form edit <form-id>
Love having this power at my fingerprints, kudos to everyone involved!
]]>While trying to import entries using csv I keep getting error:
PHP Warning: file_get_contents(test_gf_2.csv): failed to open stream: No such file or directory
I tried changing the permissions to 777. No go.
Tried exporting the entries to a file and loading those again. No go.
Any help much appreciated.
]]>This forum isn’t monitored so if you need support for this plugin, please open a ticket on gravityforms.com. Thanks!
]]>I discovered an issue when using the CLI Tool. I had to add a bunch of fields to a lot of forms so the CLI tool became really handy to do quickly with a script.
The issue i’ve found is that when going back in and editing forms in the normal WP editor, adding any fields will use the same IDs as fields added from the CLI causing conflicts and fields to get overwritten. Ive had to delete all the fields I created in the CLI and have had to make them manually, causing a huge time waste.
Summary: The WP GF editor is not seeing where the ID is getting incremented too after using he CLI.
]]>Is it possible to add the “–offset” parameter to the gf entry export [id]
command?
I see that it’s available for the gf entry list [id]
, so hopefully it shouldn’t be too difficult to implement similar function to the export?
Or a date range functionality like the GUI export would be great as well.
We do a daily export and migrate into another system, and the processing for that takes forever. If we can filter it to only new entries or I can set the offset so it only get the latest would be a lifesaver!
Great plugin! Thanks guys!
]]>I’m totally new to this whole WP-CLI thing but I downloaded Putty, and managed to install Wp-Cli with the wget command. I couldn’t get the ‘sudo mv wp-cli.phar /usr/local/bin/wp’ to work right so that I could use ‘wp’ commands. I’m sure I’m doing something really dumb, but I’m totally at a loss. I ended up creating a wp folder via my ftp and moving the wp-cli.phar file into it but I’m sure that didn’t help my cause cuz’ it’s still not letting me use wp before the commands. Any guidance would be hugely appreciated!
]]>Good Morning,
I just noticed that fields with “Admin Field Label” are respected in the GUI export, but are not on the Gravity Forms CLI export function.
Can I request this to be added as a feature?
Thanks,
Vinnie Vu
]]>Is it possible to use this to copy one form to other blogs in a multisite network?
Copy form from blog id 1 to blog id 2?
ML
]]>The field names for JSON entry export is showing the field ID, instead of the field name.
Not a major issue, just unexpected.
]]>I’m finding a need for an option to export entries with a date filter.
This option is available through the GUI export function. But I need to do some additional processing that would be easier on the backend.
The gf entry export option doesn’t have a date filter that only return date after a certain date option. That would be really great to have!
]]>Hi,
It would be cool if there was a command to update the settings like the the licence key and easily removing the licence from the command line.
We have the case where the client is moving on and we want to remove our licence key.
]]>New lines were added which reference the GFCommon
class of the Gravity Forms plugin, which may not yet exist.
For example, in the install
function of class-gf-cli-root.php
on line 103, the following is present:
$key = GFCommon::get_key();
However, as this is at the start of the install function, the Gravity Forms plugin files have not yet been downloaded, and so a PHP fatal error is thrown due to the class not being found.
]]>The form update
command requires passing the form json on the command line. This doesn’t work if the form’s json is longer than the maximum accepted command line length.
I feel it would be more useful if there were a create-update command that took a file and created the forms that were missing and updated the forms that were already in the system.
]]>I have an issue where new entries added via the CLI are not actually added to the form. This is the case for both the entry ‘import’ and ‘create’ commands.
I have run this on a fresh install with no other plugins to rule out conflicts with other plugins, etc.
I am following the examples documented here: https://www.stevenhenty.com/gravity-forms-cli/
The form:
wp gf form list
+----+--------------+---------------------+-----------+-------------+------------+
| id | title | date_created | is_active | entry_count | view_count |
+----+--------------+---------------------+-----------+-------------+------------+
| 1 | Support Form | 2017-05-30 05:28:29 | 1 | 0 | 0 |
+----+--------------+---------------------+-----------+-------------+------------+
The form fields:
wp gf field list 1
+----+------+-------+
| id | type | label |
+----+------+-------+
| 1 | text | ID |
| 2 | text | Name |
+----+------+-------+
The ‘entry create’ command:
wp gf entry create 1 --ID=1 --Name=Test --debug
Debug (bootstrap): No readable global config found (0.018s)
Debug (bootstrap): No project config found (0.02s)
Debug (bootstrap): No package autoload found to load. (0.291s)
Debug (bootstrap): ABSPATH defined: /Applications/MAMP/htdocs/localhost/wordpress/ (0.291s)
Debug (bootstrap): Begin WordPress load (0.292s)
Debug (bootstrap): wp-config.php path: /Applications/MAMP/htdocs/localhost/wordpress/wp-config.php (0.292s)
Debug (bootstrap): Loaded WordPress (0.948s)
Debug (bootstrap): Running command: gf entry create (0.948s)
<strong>Success: Entry created successfully. Entry ID: 1</strong>
The result:
wp gf entry list 1
+----------+-------+---------+
| Entry Id | 1: ID | 2: Name |
+----------+-------+---------+
+----------+-------+---------+
The database shows an entry in the wp_rg_lead
table, but nothing in the wp_rg_lead_detail
table.
wp_rg_lead:
# id, form_id, post_id, date_created, is_starred, is_read, ip, source_url, user_agent, currency, payment_status, payment_date, payment_amount, payment_method, transaction_id, is_fulfilled, created_by, transaction_type, status
'1', '1', NULL, '2017-05-30 05:30:44', '0', '0', '127.0.0.1', 'https://localhost/wordpress', 'API', 'USD', NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'active'
wp_rg_lead_detail:
# id, lead_id, form_id, field_number, value
[empty]
The ‘entries’ count indicate that the entry has been successfully added, however, the entries list does not show anything.
Are you able to assist? Am I doing something wrong?
Thanks, Dean.
]]>Hi there, I’m exporting 331,157 entries using the WP CLI and it’s been going for upwards of 6 hours. I’m doing this off a local install, which I think would make it faster.
Other exports of around 15,000 entries have all gone fairly quickly. Is there a way to see progress of the export other than the timer at the end? It shows as “100%”, but the file still has not been created.
]]>Hi,
I’m trying to create fields based on outputting their JSON, editing that, and then using “field create” to make similar, but slightly different version of the original field.
My problem is that the –field-json flag does not seem to do anything. For example:
wp gf field get 29 9 > field_9.json
wp gf field create 29 select testlabel --field-json=field_9.json
I’d expect that to duplicate field 9, but it creates a blank select field with the label “testlabel”, but none of the description & settings from the field 9 JSON file. The JSON file itself looks fine with the contents I’d expect.
Additionally, shouldn’t type and label not be required fields when pulling from a JSON file which already contains that content?
Thanks,
Jason
I believe Gravity Forms creates database tables during the install Wizard. Is there anyway we can use GF CLI to create these custom tables without running these manually in the browser?
]]>Where are the commands such as “wp help gf” supposed to be executed from?
Currently there is only error when executing the following command from wp-content/plugins/gravityformscli:
users-MacBook-Pro:gravityformscli user$ wp help gf
-bash: wp: command not found
Any help would be greatly appreciated thanks.
]]>Hi, first of all, thanks for the excellent plugin, it’s very useful.
I’m having an issue, entries export in csv format isn’t working, export makes empty files. However, in json format works fine.
Please see this screenshot https://pasteboard.co/8Y6XKXJuZ.png
I’m thinking of using a PHP lib like this one https://github.com/danmandle/JSON2CSV to convert json files in csv ones, but that definitely isn’t a good practice.
Thanks in advance.
P.S.
I’m using these tools
GF – 2.0.7
WP CLI – 0.24.1
GF CLI – 1.0-beta-1
WP CORE – 4.6.1
]]>Hi there,
Thanks for this great tool, wondering if it’s possible to add this to the WP-CLI Package Index so it can be installed and managed via WP-CLI rather than using a plugin?
]]>I am using your plugin to download GravityForms via a script. Is it possible for you to input the key into options after download?
]]>