Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic support for Multiple Choice and Image Choice fields #1573

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

jakejackson1
Copy link
Member

@jakejackson1 jakejackson1 commented Sep 4, 2024

Description

Add new field classes for Gravity Forms 2.9 Multiple Choice and Image Choice fields. These fields are treated like Radio or Checkbox fields under the hood, just like Gravity Forms on the Entry Details page. The $form_data array for Image Choices includes image attachment data.

Gravity PDF Core Booster will enhance the Image Choice field so the actual images can be displayed in the PDF.

TODO

  • Write unit tests
  • Abstract the fieldObject class so it can be reused

Testing instructions

Screenshots

Checklist:

  • I've tested the code.
  • My code is easy to read, follow, and understand
  • My code follows the accessibility standards.
  • My code has proper inline documentation / docblocks.

Additional Comments

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 88.31169% with 9 lines in your changes missing coverage. Please review.

Project coverage is 77.82%. Comparing base (82b1202) to head (50e1283).
Report is 3 commits behind head on development.

Files with missing lines Patch % Lines
src/Helper/Fields/Field_Image_Choice.php 87.87% 4 Missing ⚠️
src/Helper/Helper_Abstract_Fields_Input_Type.php 89.28% 3 Missing ⚠️
src/Helper/Fields/Field_Multi_Choice.php 50.00% 1 Missing ⚠️
src/Helper/Fields/Field_Survey.php 66.66% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development    #1573      +/-   ##
===============================================
- Coverage        77.82%   77.82%   -0.01%     
===============================================
  Files              252      255       +3     
  Lines            13923    13896      -27     
  Branches           370      370              
===============================================
- Hits             10836    10814      -22     
+ Misses            3079     3074       -5     
  Partials             8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jakejackson1 jakejackson1 marked this pull request as ready for review September 5, 2024 03:34
@jakejackson1 jakejackson1 merged commit fb645cd into development Sep 5, 2024
12 of 13 checks passed
@jakejackson1 jakejackson1 linked an issue Sep 5, 2024 that may be closed by this pull request
@jakejackson1 jakejackson1 deleted the image-multi-choices branch September 5, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gravity Forms 2.9 Compatibility
1 participant