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

gw-capitilize-submitted-data.php: Added support to capitalize list fields. #913

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

saifsultanc
Copy link
Contributor

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2743721686/73093

Summary

Add support for list fields in the snippet.

An entry before list field capitalization:
Screenshot 2024-10-26 at 1 26 53 AM

An entry after list field capitalization:
Screenshot 2024-10-26 at 1 27 03 AM

@saifsultanc saifsultanc added the enhancement New feature or request label Oct 25, 2024
Comment on lines +32 to +34
$_POST[ $input_key ] = array_map( function( $value ) {
return ucwords( strtolower( $value ) );
}, $_POST[ $input_key ] );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work with multi-column List fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it works fine with multi column list fields as well.

Copy link

Warnings
⚠️ When ready, don't forget to request reviews on this pull request from your fellow wizards.

Generated by 🚫 dangerJS against 5f98c6b

Copy link
Contributor

@claygriffiths claygriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S&M

@saifsultanc saifsultanc merged commit 6762bc1 into master Oct 31, 2024
2 of 3 checks passed
@saifsultanc saifsultanc deleted the saif/add/73093-capitalize-list-fields branch October 31, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants