Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View karlpotter's full-sized avatar

Karl Potter karlpotter

View GitHub Profile
<?php
add_filter( 'fg_legalsigning_pdf_args', 'add_list_field_to_pdf', 10, 4 );
function add_list_field_to_pdf( $pdf_meta, $feed, $entry, $form ) {
// Prepare column names for each day of the week.
$column_names = array(
'Sunday %d',
'Monday %d',
add_filter( 'fg_legalsigning_form_path', function( $form_path, $form_id ) {
if ( $form_id === 103 ) {
// Run code for Form #103
return 'wp-content/uploads/gravity_forms/legalsigning/mycustom103';
}
return $form_path;
}, 10, 2 );
<?php
/**
* Modify the base folder where generated documents are stored.
*
* @param string $base_path The base documents folder. Defaults to wp-content/uploads/gravity_forms/fillablepdfs.
*/
add_filter( 'fg_legalsigning_base_path', function( $base_path ) {
return '/path/to/pdfs/folder';
location ^~ /wp-content/uploads/gravity_forms/fillablepdfs/ {
deny all;
}
<?php
/**
* Add link to document generated by by Legal Signing to Zapier request.
*
* @param array $body An associative array containing the request body that will be sent to Zapier.
* @param array $feed The feed object currently being processed.
* @param array $entry The entry object currently being processed.
* @param array $form The form object currently being processed.
*
add_filter( 'fg_fillablepdfs_form_path', function( $form_path, $form_id ) {
if ( $form_id === 103 ) {
// Run code for Form #103
return 'wp-content/uploads/gravity_forms/fillablepdfs/mycustom103';
}
return $form_path;
}, 10, 2 );