GravityPDF / gravity-pdf

Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using Gravity Forms.
https://gravitypdf.com
89 stars 21 forks source link

Missing conditional logic rule if no conditional fields in form #1511

Closed jakejackson1 closed 3 months ago

jakejackson1 commented 3 months ago

Description

When there are no conditional fields in the form, the PDF conditional logic feature is missing the third "rule" input for entry meta rules. This change ensures Gravity Forms correctly displays the rule input first the first rule.

Note: due to the way GFs handles field conditional logic, the same problem occurs if you add a second rule. It's not fixable on our end, but adding a third rule will display the input again. It's such an edge-case this isn't likely to happen often, and the initial rule does work.

Fixes #1510

Testing instructions

  1. Create new form and add HTML field to it
  2. Create PDF for the form and enable conditional logic
  3. Verify the first rule shown has all three input boxes, and you can switch between entry meta data items

Screenshots

Checklist:

Additional Comments

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.97%. Comparing base (84df191) to head (e74b6c1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #1511 +/- ## ============================================ Coverage 76.97% 76.97% ============================================ Files 244 244 Lines 12740 12740 Branches 370 370 ============================================ Hits 9807 9807 Misses 2925 2925 Partials 8 8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.