| 开发者 |
Gilwebdeveloper
gb-plugins |
|---|---|
| 更新时间 | 2026年10月4日 19:39 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
add_action( 'gbfdb_after_save_6', function ( $data, $lead_id ) { // $data['fields'] — what was submitted, e.g. $data['fields']['your-email'] // $data['meta'] — form_id, type, url, remote_ip, user_agent... }, 10, 2 );
The number after gbfdb_after_save_ is the form ID. Forms saved by "All forms" or "Form by selector" use gbfdb_after_save_forms-{id}, where the ID is the form's id attribute — their hook is kept apart because anyone can post to it. gbfdb_after_save fires for every form (third argument: the lead type), and after_save_lead receives the lead ID.
Filters: gbfdb_before_save_lead (change or skip a lead before it is saved), gbfdb_exclude_field, gbfdb_client_ip (the visitor's real address behind a proxy or CDN), gbfdb_supported_plugins, gbfdb_forms_settings, gbfdb_capability, gbfdb_page_url, gbfdb_lead_order, gbfdb_field_output_data, gbfdb-before-admin-save, gbfdb-admin-save.
Actions: gbfdb_admin_page_add_fieldset and gbfdb_admin_page_add_fieldset_fields add a tab to the settings screen; before_gbfdb_field_output and after_gbfdb_field_output add markup around a field on the lead screen.
Docs and support
gb-plugins.com
gb-forms-db folder to /wp-content/plugins/, or install it from Plugins > Add New.In your own WordPress database, as a private post type. Nothing is sent anywhere unless you hook into gbfdb_after_save.
Yes. The form plugins in the list are saved through their own hooks. For other forms, "All forms" and "Form by selector" catch the submission in the browser, whether the form reloads the page or not.
Password fields, payment-card fields, nonces and captcha responses are never saved, and login, registration, search, cart and checkout forms are skipped. Use the gbfdb_exclude_field filter to leave out more.
Administrators (the manage_options capability). Change it with the gbfdb_capability filter. Other roles cannot reach leads through any WordPress screen or API.
WordPress empties the trash after 30 days, as it does for posts.
Return the visitor's real IP from the gbfdb_client_ip filter. Otherwise every visitor looks like the proxy, and the limit on submissions from one address (30 in 10 minutes) applies to all of them together.
gbfdb_capability). In 1.x, editors could read and delete them through XML-RPC.