Skip to content

Commit

Permalink
Stop populating fields that aren’t opted-in
Browse files Browse the repository at this point in the history
Fixes #168
  • Loading branch information
sclark3-godaddy committed Mar 29, 2024
1 parent 6774c56 commit ac3adcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/Pods_GF_Addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ public function populate_related_items_settings( $position, $form_id ) {
<input type="checkbox" id="pods_populate_related_items_value" onclick="SetFieldProperty('pods_populate_related_items', this.checked);" />
<label for="pods_populate_related_items_value" class="inline">
<?php _e( 'Populate Related Items (requires a feed configured)', 'pods-gravity-forms' ); ?>
<?php gform_tooltip( 'form_populate_related_items_value' ) ?>
<?php gform_tooltip( 'form_pods_populate_related_items_value' ) ?>
</label>
</li>
<?php
Expand Down Expand Up @@ -837,7 +837,7 @@ public function populate_related_items_editor_script() {
*/
public function populate_related_items_tooltip( $tooltips ) {

$tooltips['form_populate_related_items_value'] = sprintf( '<h6>%s</h6> %s', __( 'Populate Related Items from Pods', 'pods-gravity-forms' ), __( 'Check this box to populate the related items from Pods instead of keeping the list up-to-date manually.' ) );
$tooltips['form_pods_populate_related_items_value'] = sprintf( '<h6>%s</h6> %s', __( 'Populate Related Items from Pods', 'pods-gravity-forms' ), __( 'Check this box to populate the related items from Pods instead of keeping the list up-to-date manually.' ) );

return $tooltips;

Expand Down Expand Up @@ -1082,7 +1082,7 @@ public function _gf_pre_render( $form, $ajax = false, $entry = null, $admin_edit
*/
foreach ( $form['fields'] as $gf_field ) {
if ( empty( $gf_field->pods_populate_related_items ) ) {
//continue;
continue;
}

$pod_field = null;
Expand Down

0 comments on commit ac3adcd

Please sign in to comment.