Skip to content

Commit

Permalink
gpi-capture-resource-name.php: Updated placeholder values.
Browse files Browse the repository at this point in the history
  • Loading branch information
spivurno authored Oct 25, 2023
1 parent 9e8ad44 commit 219344f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gp-inventory/gpi-capture-resource-name.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
* the current Resource at the time of submission and save that value to a field. This snippet can help.
*/
// Update "123" to your form ID.
add_action( 'gform_after_submission_475', function( $entry, $form ) {
add_action( 'gform_after_submission_123', function( $entry, $form ) {

// Update "1" to your Product field ID.
$product_field_id = 1;
// Update "4" to your Product field ID.
$product_field_id = 4;

// Update "3" to a Hidden field ID that will capture the resource name.
$resource_field_id = 3;
// Update "5" to a Hidden field ID that will capture the resource name.
$resource_field_id = 5;

$product_field = GFAPI::get_field( $form, $product_field_id );
$resource = get_post( $product_field->gpiResource );

Check warning on line 19 in gp-inventory/gpi-capture-resource-name.php

View workflow job for this annotation

GitHub Actions / PHPCS

Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
Expand Down

0 comments on commit 219344f

Please sign in to comment.