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

Support saving blank options for radio fields and checkbox field #1358

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

AbdiTolesa
Copy link
Contributor

@AbdiTolesa AbdiTolesa commented Nov 1, 2023

Fix https://github.com/Strategy11/formidable-pro/issues/3385

Since I noticed there were other proposed solutions to this like the one in #1171, I'm just trying a different approach of allowing blank options to be saved/retrieved without being trimmed.

I'm not quite sure if this is worth consider or not but it could be used to brainstorm on it.

Screencast shared by Mike on how to replicate it:
HUMIJ1WBdr

Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (0eb0725) 29.30% compared to head (7a05e03) 29.31%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1358   +/-   ##
=========================================
  Coverage     29.30%   29.31%           
- Complexity     7259     7261    +2     
=========================================
  Files           105      105           
  Lines         23927    23930    +3     
=========================================
+ Hits           7013     7016    +3     
  Misses        16914    16914           
Files Coverage Δ
classes/controllers/FrmFieldsController.php 33.10% <ø> (+0.07%) ⬆️
classes/models/FrmEntryMeta.php 25.49% <100.00%> (ø)
classes/models/FrmEntryValidate.php 63.12% <100.00%> (ø)
classes/helpers/FrmAppHelper.php 38.16% <75.00%> (+0.07%) ⬆️

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

@AbdiTolesa AbdiTolesa changed the title Support saving blank values for radio fields and checkbox field Support saving blank options for radio fields and checkbox field Nov 2, 2023
@AbdiTolesa
Copy link
Contributor Author

@Crabcyborg I have drafted this PR to know what you think about it, I'm thinking of an alternative approach to support saving blank options in radio, radio based and checkbox fields. This at least has solved the issue for me. The blank options won't be selected by default. What's your thoughts on it?

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.

1 participant