Skip to content

Commit aecfdc3

Browse files
committed
gpns-add-other-fields-to-date-schedule.php: Added other fields to the GP Notification Scheduler.
1 parent 79892bf commit aecfdc3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gp-notification-scheduler/gpns-add-other-fields-to-date-schedule.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
* https://gravitywiz.com/documentation/gravity-forms-notification-scheduler/
55
*/
66
// Replace 131 in 'gpns_date_fields_131' with your form ID, and replace 5 in '$field->id == 5' with the field ID to add.
7-
add_filter( 'gpns_date_fields_131', 'add_field_to_ns', 10 ,2 );
7+
add_filter( 'gpns_date_fields_131', 'add_field_to_ns', 10, 2 );
88
function add_field_to_ns( $fields, $form ) {
99

1010
// loop over the form fields
11-
foreach( $form['fields'] as $field ) {
11+
foreach ( $form['fields'] as $field ) {
1212

1313
// find your target field (to add to gpns)
14-
if( $field->id == 5 ) {
14+
if ( $field->id == 5 ) {
1515
// add the target field to fields array
1616
array_push( $fields, $field );
1717
}
1818
}
19-
19+
2020
return $fields;
2121
}

0 commit comments

Comments
 (0)