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

Allow overriding label for values #37

Open
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

JeffersonBledsoe
Copy link
Member

@JeffersonBledsoe JeffersonBledsoe commented Sep 22, 2023

This PR introduces the concept of a 'display value' to change how a value will appear in an email or on a form. For example, a 'Single choice' field could have submitted values of ['A', 'B', 'C'], but are shown to the user as ['Option A', 'Value B', 'Option C'].

Mostly tested in production with the 'Yes/ No widget' in volto-form-block, but should work for other fields too!

Requires collective/volto-form-block#85 for frontend

@coveralls
Copy link

coveralls commented Sep 25, 2023

Pull Request Test Coverage Report for Build 7920161992

Details

  • 0 of 93 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+3.5%) to 93.205%

Totals Coverage Status
Change from base Build 7919988301: 3.5%
Covered Lines: 727
Relevant Lines: 780

💛 - Coveralls

@JeffersonBledsoe JeffersonBledsoe marked this pull request as ready for review December 4, 2023 21:00
@JeffersonBledsoe JeffersonBledsoe mentioned this pull request Dec 12, 2023
3 tasks
@JeffersonBledsoe JeffersonBledsoe requested review from cekk and removed request for cekk January 19, 2024 18:31
@JeffersonBledsoe JeffersonBledsoe removed the request for review from cekk September 13, 2024 09:16
@JeffersonBledsoe
Copy link
Member Author

While getting this up-to-date, I noticed we are now removing fields who's IDs don't exist on the form block definition (great!). This logic needs updating to account for custom_field_id being sent rather than the original field ID

# Conflicts:
#	src/collective/volto/formsupport/tests/test_send_action_form.py
@folix-01
Copy link
Member

@JeffersonBledsoe Add some tests please

@folix-01
Copy link
Member

@JeffersonBledsoe Add some tests please

Ah ok, exists already, just opened old version of this pr in some way :D

@JeffersonBledsoe
Copy link
Member Author

@JeffersonBledsoe Add some tests please

Ah ok, exists already, just opened old version of this pr in some way :D

Haha, thanks for checking! 😄 I look forward to the feedback!

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.

4 participants