Skip to content

Commit

Permalink
FIX: Fixes #16 Adds "skiplink" functionality to the feedback form
Browse files Browse the repository at this point in the history
  • Loading branch information
User for performing fabric deployments committed Jan 23, 2020
1 parent f6a45e1 commit a86a418
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Extensions/PageFeedbackControllerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public function getPageFeedbackForm()

$form = $formByMode::create($this->owner, __FUNCTION__);

// Optionally enable skiplnks to "drop" users to the correct area in the page
if ($skipLink = $this->owner->config()->get('pagefeedback_skiplink')) {
$form->setFormAction(sprintf('%s#%s', $form->FormAction(), $skipLink));
}

if ($form->hasExtension(FormSpamProtectionExtension::class) && $enableSpamProtection) {
$form->enableSpamProtection();
}
Expand Down

0 comments on commit a86a418

Please sign in to comment.