Skip to content

Commit

Permalink
Merge pull request #17 from phptek/issue/16
Browse files Browse the repository at this point in the history
FIX: Fixes #16 Adds "skiplink" functionality to the feedback form
  • Loading branch information
zanderwar authored Feb 13, 2020
2 parents f6a45e1 + a86a418 commit bb7769c
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 bb7769c

Please sign in to comment.