plugin-icon

Module Pods pour Gravity Forms

Interfacez-vous avec l'extension/plugin Gravity Forms pour créer un élément Pod à partir d'une soumission de formulaire.
Évaluations
5
Mis à jour récemment
March 29, 2024
Version
1.5.0
Installations actives
1K
Module Pods pour Gravity Forms
  • Requires: Pods 3.0+, Gravity Forms 1.9+
  • Demo: Want to try Pods GF out? Check out the Gravity Forms Live Demo and install the Pods and Pods Gravity Forms plugins once you’re there
  • Bugs/Ideas: Please report bugs or request features on GitHub

Un merci spécial à Rocketgenius pour leur soutien aux parrains et à Naomi C. Bush pour son aide dans le travail initial d’interface utilisateur.

WP-CLI Command for Syncing Entries

This add-on provides the ability to sync entries from a Form Submission and Entry Edit screen. To bulk sync all entries even prior to setting up a Pods Gravity Form Feed, you can run a WP-CLI command.

Example 1: Sync all entries for Form 123 first active Pod feed

wp pods-gf sync --form=123

Example 2: Sync all entries for Form 123 using a specific feed (even if it is inactive)

wp pods-gf sync --form=123 --feed=2

Mapping GF List Fields to a Pods Relationship field

You can map a GF List field to a Relationship field related to another Pod. Using the below examples you can customize how the automatic mapping works. By default, the list columns will map to the pod fields with the same labels.

Example 1: Customize what columns map to which Related Pod fields for Form ID 1, Field ID 2

Customizing a list field row can be done by using the pods_gf_field_columns_mapping filter, which has Form ID and Field ID variations (pods_gf_field_columns_mapping_{form_id} and pods_gf_field_columns_mapping_{form_id}_{field_id}).

add_filter( 'pods_gf_field_columns_mapping_1_2', 'my_columns_mapping', 10, 4 ); /** * Filter list columns mapping for related pod fields. * * @param array $columns List field columns. * @param array $form GF form. * @param GF_Field $gf_field GF field data. * @param Pods $pod Pods object. * * @return array */ function my_columns_mapping( $columns, $form, $gf_field, $related_obj ) { $columns[0] = 'first_field'; $columns[1] = 'second_field'; $columns[2] = 'third_field'; return $columns; }

Example 2: Customize a List row for Form ID 1, Field ID 2

Customizing a list field row can be done by using the pods_gf_field_column_row filter, which has Form ID and Field ID variations (pods_gf_field_column_row_{form_id} and pods_gf_field_column_row_{form_id}_{field_id}).

add_filter( 'pods_gf_field_column_row_1_2', 'my_column_row_override', 10, 6 ); /** * Filter list field row for relationship field saving purposes. * * @param array $row List field row. * @param array $columns List field columns. * @param array $form GF form. * @param GF_Field $gf_field GF field data. * @param array $options Pods GF options. * @param Pods|false $related_obj Related Pod object. * * @return array */ function my_column_row_override( $row, $columns, $form, $gf_field, $options, $related_obj ) { // Update certain row fields based on the value of specific column. if ( ! empty( $row['user_relationship_field'] ) ) { $user = get_userdata( (int) $row['user'] ); // Set the post_title to match the User display name. if ( $user && ! is_wp_error( $user ) ) { $row['post_title'] = $user->display_name; } } return $row; }
Gratuitsur le plan Creator
En procédant à l’installation, vous acceptez les Conditions d’utilisation de WordPress.com ainsi que les Conditions de l’extension tierce.
Installations actives
1K
Testé jusqu’à version
6.5.5
Cette extension est disponible en téléchargement pour être utilisée sur votre installation WordPress auto-hébergée.