collective / collective.volto.formsupport

Enable support for customizable forms in Volto
GNU General Public License v2.0
2 stars 8 forks source link

Allow overriding label for values #37

Open JeffersonBledsoe opened 1 year ago

JeffersonBledsoe commented 1 year ago

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 https://github.com/collective/volto-form-block/pull/85 for frontend

coveralls commented 12 months ago

Pull Request Test Coverage Report for Build 7920161992

Details


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

💛 - Coveralls
JeffersonBledsoe commented 1 week ago

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

folix-01 commented 3 days ago

@JeffersonBledsoe Add some tests please

folix-01 commented 3 days ago

@JeffersonBledsoe Add some tests please

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

JeffersonBledsoe commented 3 days ago

@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!