Skip to content

Add Address field part shortcodes to calculation popup#2639

Merged
Crabcyborg merged 4 commits into
work_on_adding_show_options_to_code_list_popupfrom
feature/address-field-show-options
Dec 9, 2025
Merged

Add Address field part shortcodes to calculation popup#2639
Crabcyborg merged 4 commits into
work_on_adding_show_options_to_code_list_popupfrom
feature/address-field-show-options

Conversation

@shervElmi
Copy link
Copy Markdown
Contributor

@shervElmi shervElmi commented Dec 8, 2025

Base PR

#1379

Pro PR

https://github.com/Strategy11/formidable-pro/pull/6135


Fixes https://github.com/Strategy11/formidable-pro/issues/5825

Adds support for accessing individual Address field parts in calculations, similar to existing Name field functionality.

- Added maybeAddAddressPartShortcodes function to support Address field part shortcodes (line1, line2, city, state, zip, country)
- Added function call in field population loop to display Address field parts in calculation popup
- Similar pattern to Name field implementation

Resolves #5825
- Use template literals instead of string concatenation
- Extract addressParts as const variable for better readability
- Add descriptive JSDoc parameter documentation
- Refine function description to be more professional and direct
- Cleaner forEach syntax with consistent formatting
…hortcodes

- Remove hyphens from JSDoc parameter descriptions for consistency with project style
- Align parameter documentation format with standard JSDoc conventions
Comment thread js/src/admin/admin.js Outdated
- Added wp.hooks.doAction('frm_add_calc_field_shortcodes') hook
- Removed maybeAddAddressPartShortcodes() function (Address fields are Pro-only)
- Allows Pro and other extensions to add custom field part shortcodes
- Well-documented hook with JSDoc for extension developers
@shervElmi shervElmi requested a review from Crabcyborg December 9, 2025 18:23
@Crabcyborg Crabcyborg added this to the 6.27 milestone Dec 9, 2025
Copy link
Copy Markdown
Contributor

@Crabcyborg Crabcyborg left a comment

Choose a reason for hiding this comment

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

Thanks @shervElmi!

@Crabcyborg Crabcyborg merged commit 6b72e5c into work_on_adding_show_options_to_code_list_popup Dec 9, 2025
12 of 13 checks passed
@Crabcyborg Crabcyborg deleted the feature/address-field-show-options branch December 9, 2025 18:49
@Crabcyborg Crabcyborg removed this from the 6.27 milestone Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants