Gravity Forms (WordPress-plugin): verschil tussen versies
Regel 77: | Regel 77: | ||
* https://www.google.com/recaptcha/about/ | * https://www.google.com/recaptcha/about/ | ||
* This requires the ''Gravity Forms reCAPTCHA Add-On'': https://www.gravityforms.com/add-ons/recaptcha/ | * This requires the ''Gravity Forms reCAPTCHA Add-On'': https://www.gravityforms.com/add-ons/recaptcha/ | ||
+ | * This is not the same as https://wordpress.org/plugins/gravity-forms-zero-spam/ | ||
+ | |||
+ | == Examples === | ||
+ | |||
+ | <pre> | ||
+ | $ wp gf install gravityformspolls | ||
+ | |||
+ | Error: A valid license key must be specified either in the GF_LICENSE_KEY constant or the --key option. | ||
+ | </pre> | ||
+ | |||
+ | # the error doesn't say much: | ||
+ | # | ||
+ | $ wp gf install blublublub | ||
+ | |||
+ | Error: A valid license key must be specified either in the GF_LICENSE_KEY constant or the --key option. | ||
+ | </pre> | ||
+ | |||
+ | <pre> | ||
+ | # This should be the correct slug: | ||
+ | # | ||
+ | $ wp gf install gravityformsrecaptcha | ||
+ | |||
+ | Error: A valid license key must be specified either in the GF_LICENSE_KEY constant or the --key option. | ||
+ | </pre> | ||
== See also == | == See also == | ||
* [[Wp gf (WP-CLI) | wp gf]] | * [[Wp gf (WP-CLI) | wp gf]] |
Versie van 31 okt 2022 11:01
Sinds 2020 is Gravity Forms m'n standaard formulieren-plugin, op advies van een specialist. Ik denk dat ik 'm ok vind. De belangrijkste dingen gaan heel soepel. Waarschijnlijk zijn het de nag-screens om maar de betaalde versie te kopen, waar ik het meeste moeite mee heb. En dat het de complete backend-interface van WordPress overneemt. Verder is-ie prima.
Dit artikel gaat tot op heden (okt. 2021) vrijwel uitsluitend over de WP-CLI-commando's om Gravity Forms en bijbehorende formulieren te beheren.
Licensering
Het is een betaalde plugin. Zonder licentie doet-ie nix.
- Als ik sites kloon, is de gekloonde licentie ok - Itt. tot een andere plugin (naam vergeten) waarbij de licentie URL-afhankelijk was
- Als ik alleen de plugin kopiëer en plak, is de licentie niet ok.
WP-CLI
Installation
Gravity Forms has quite a library of WP-CLI commands, but these need to be separately installed as a plugin:
wp plugin install gravityformscli --activate
Disable or enable a form?
I have the impression that you cannot disable or enable a form through a dedicated WP-CLI command.
Example using SQL:
cd $site_path sql="update wp_gf_form set is_active=0 where id=1" wp db query "$sql"
Database-model
Basic form settings - wp_gf_form
Basic form settings are stored in table wp_gf_form
. Example:
$ select * from wp_gf_form; +----+----------------+---------------------+--------------+-----------+----------+ | id | title | date_created | date_updated | is_active | is_trash | +----+----------------+---------------------+--------------+-----------+----------+ | 1 | Contact form | 2019-08-05 08:38:28 | NULL | 0 | 0 | | 3 | Selection Tool | 2020-12-23 09:01:02 | NULL | 1 | 0 | +----+----------------+---------------------+--------------+-----------+----------+
Fields:
* id MEDIUMINT(10) PK NN UN AI * title VARCHAR(150) NN * date_created DATETIME NN * data_updated DATETIME Default: NULL * is_active TINYINT(10) NN Default: 1 * is_trash TINYINT(10) NN Default: 0
Form definitions - wp_gf_form_meta
Volledige definities van formulieren vind je in tabel wp_gf_form_meta
. Ik denk dat het JSON-code is. Voordeel boven reguliere serialised data: Het aantal bytes per veld is niet vastgelegd. Je kunt het dus veel gemakkelijker zelf bewerken. De verschillende kolommen:
form_id
: Dezelfde formulier-ID als via de WP-CLIdisplay_meta
: Lijkt dezelfde formulierdefinitie te zijn als die je krijgt via WP-CLIentries_grid_meta
: Onduidelijke serialised data - Heeft ogenschijnlijk gelukkig niets te maken met formulier zelfconfirmations
: Complete definities van verzend-bevestigingennotifications
: Complete definities van de notificatie-emails die naar beheerders wordt gestuurd.
ReCAPTCHA add-on
Google's ReCAPTCHA can be integrated into forms:
- wp_admin » Forms » Settings » ReCAPTCHA
- https://www.google.com/recaptcha/about/
- This requires the Gravity Forms reCAPTCHA Add-On: https://www.gravityforms.com/add-ons/recaptcha/
- This is not the same as https://wordpress.org/plugins/gravity-forms-zero-spam/
Examples =
$ wp gf install gravityformspolls Error: A valid license key must be specified either in the GF_LICENSE_KEY constant or the --key option.
- the error doesn't say much:
$ wp gf install blublublub
Error: A valid license key must be specified either in the GF_LICENSE_KEY constant or the --key option.
# This should be the correct slug: # $ wp gf install gravityformsrecaptcha Error: A valid license key must be specified either in the GF_LICENSE_KEY constant or the --key option.