Description
Allows the URL to the entry from the checklist to be modified.
Parameters
Parameter | Type | Details |
---|---|---|
$url, | String | Entry URL |
$form | Form | The form |
$entries | Entry | Entries |
$exempt | String | URL to be exempted |
Example
Modify which URL the checklist entry link goes to for a specific form.
add_filter( 'gravityflowchecklists_entry_url', 'custom_checklist_entry_url', 10, 4 );
function custom_checklist_entry_url( $url, $form, $entries, $exempt ) {
//Replace with your form ID
if ( $form['id'] == '7' ) {
if ( is_array( $entries ) ) {
//Replace with your specific entry URL and logic for which entry to display link for if multiple exist
$url = '/custom-checklist-entry-page?lid=' . $entries[0]['id'];
}
}
return $url;
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?