Skip to content

Use the form's description placement for Consent fields set to "Use Form Setting" (6.18.0) - #1964

Merged
jakejackson1 merged 2 commits into
hot-patch-6.18.0from
fix-1488-consent-description-placement-6.18
Oct 26, 2026
Merged

jakejackson1 merged 2 commits into
hot-patch-6.18.0from
fix-1488-consent-description-placement-6.18

Conversation

@gravitypdf-bot

Copy link
Copy Markdown
Contributor

Summary

Backport of #1960 to 6.18.0. Consent fields left on the default "Use Form Setting" description placement always printed their description below the checkbox in PDFs, even when the form's Description Placement was "Above inputs". The Consent field now falls back to the form's setting when the field doesn't set one.

  • Consent field description placement inherits the form's Description Placement when the field uses "Use Form Setting"
  • PHPUnit coverage for inherited, overridden and unset placement
  • CHANGELOG line under 6.18.0

Try it

gh pr checkout fix-1488-consent-description-placement-6.18 --repo GravityPDF/gravity-pdf
vendor/bin/phpunit --filter Test_Field_Consent

Or by hand: on a form with a Consent field, set Form Settings > Form Layout > Description Placement to "Above inputs", leave the Consent field's Description Placement on "Use Form Setting", submit an entry and view a Core PDF (e.g. Zadani). The consent description now prints above the tick.

Test plan

  • Form placement "Above inputs" + field "Use Form Setting": description prints above the consent tick
  • Form placement "Below inputs" + field "Use Form Setting": description prints below
  • Field set explicitly to "Below inputs" on a form set to "Above inputs": description prints below
  • Test_Field_Consent passes
More info

Cherry-pick of #1960's squash commit (c47d9c1), which applied cleanly; Field_Consent.php was identical on both branches. The test lands in 6.18's tests/phpunit/unit-tests/Helper/Fields/Test_Field_Consent.php. The only other change is the CHANGELOG line, added at the end of the 🐞 Bug group under 6.18.0.

Checks run locally on the 6.18 build (own test DB): Test_Field_Consent 8/8 passing; with Field_Consent.php reverted to hot-patch-6.18.0, the two "inherits form" cases fail as expected. PHPCS (phpcs.xml.dist and phpcompat.xml.dist) clean on the changed source. The full suite was not run locally; CI covers it.

See #1960 for why GF_Field::is_description_above() wasn't used.

🤖 Generated with AI

…orm Setting" (6.18.0)

Backport of #1960 (c47d9c1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jakejackson1
jakejackson1 merged commit 4d2dd6a into hot-patch-6.18.0 Oct 26, 2026
12 of 13 checks passed
@jakejackson1
jakejackson1 deleted the fix-1488-consent-description-placement-6.18 branch October 26, 2026 06:49
@gravitypdf-bot gravitypdf-bot mentioned this pull request Oct 26, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants