Sync master from upstream#80
Merged
Merged
Conversation
…nput The intlTelInput library's input handler calls _updateCountryFromNumber() on every input event, which auto-detects the country code and changes the flag. This causes the flag to jump around when browser autocomplete fills the field or when the user edits/removes the country code. Override _updateCountryFromNumber to a no-op after initialization so the flag only changes when the user explicitly picks a country from the dropdown (_selectListItem -> _setCountry bypasses this method). Fixes #2598 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Master to Dev 2.8.0
Dev To Next Release 2.8.0
Pass `shouldIframe` prop to StyleSettings and use it to resolve the correct root element. When the editor is not in iframe mode, query `.editor-styles-wrapper` from `iframeBody` so style overrides target the right container. Fixes #2567 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add URL parameter and smart tag based pre-selection for single-select
dropdown and multi-choice fields. Users can set a Dynamic Default Value
using smart tags like {get_input:param} to pre-select an option based
on URL query parameters (e.g., ?service=development).
- Add dynamicDefaultValue attribute to dropdown and multichoice block.json
- Add Dynamic Default Value control in editor (visible only in single select mode)
- Process smart tags on frontend to resolve and match option labels
- Clear dynamic default when switching to multi-select mode
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add test coverage for dynamic default value in dropdown and multi-choice fields. Tests cover GET param preselection, case-insensitive matching, no-match scenarios, multi-select mode guard, static preselection override, and empty dynamic default preservation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Cast dynamicDefaultValue to string before passing to process_smart_tags() to satisfy PHPStan level 9 type checking - Move test_resolve_dynamic_default() into existing test-dropdown-markup.php and test-multichoice-markup.php per linting convention - Remove standalone test files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes #2652
When a field block (e.g., dropdown, multi-choice) is placed inside a repeater, the field's `slug` attribute gets prefixed with the parent repeater's slug (e.g., `srfm-repeater-srfm-dropdown` instead of `dropdown`). This caused the `srfm_field_options` filter consumers to fail block-type identification since they relied on `$attributes['slug']` matching the block type name. This change injects the block type slug (`$this->slug`) into a dedicated `block_args` key before passing the attributes to the filter, giving filter consumers a reliable way to identify the block type regardless of nesting context. Fixes brainstormforce/sureforms#2639 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Coordinated bump of both vendored libraries: - astra-notices 1.1.14 -> 1.2.1 (brainstormforce/astra-notices#87): - main file renamed class-astra-notices.php -> class-bsf-admin-notices.php - class renamed Astra_Notices -> BSF_Admin_Notices with class_alias BC - dual-emits legacy astra_notice_* hooks alongside new bsf_admin_notice_* - bsf-analytics 1.1.25 -> 1.1.26 (brainstormforce/bsf-analytics#95): - switches internal call sites to BSF_Admin_Notices and bsf_admin_notice_* - class_exists guard keeps older consumers fatal-free Consumer edits are limited to the two class-load guards forced by the upstream file rename (admin/admin.php, admin/analytics.php). Existing Astra_Notices:: usages and astra_notice_after_markup_* hook listeners continue to work via the alias + dual-emit contract.
…ces-1.2.1-bsf-analytics-1.1.26 chore: update astra-notices to 1.2.1 and bsf-analytics to 1.1.26
…d integrations
- Register {entry_id} in Smart_Tags::smart_tag_list() so it appears in the editor tag picker
- Handle {entry_id} in smart_tags_callback() reading from $form_data or $submission_data
- Move send_email() to after Entries::add() so entry ID is available at send time
- Inject $form_data['entry_id'] before confirmation, redirect, and email processing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The tag resolves after Entries::add() — it has no value at form render time, so it cannot be used in Default Value fields or other pre-submission contexts. Surface this in the editor smart tag picker to prevent confusion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removing from smart_tag_list() hides it from all block editor tag pickers (including Default Value fields) since it cannot resolve before submission. Adding it as a hardcoded exception in the is_valid_tag check ensures it is still processed correctly in email templates, confirmation messages, redirect URLs, and other post-submission contexts where it has a value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…exception
Filtering {entry_id} from only the Default Value picker (not email/confirmation)
requires JS changes — both pickers share the same smart_tags_array source.
Reverting to a clean state: {entry_id} appears in all editor dropdowns and
is processed correctly in all post-submission contexts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The '{current_page_url}' case statement was indented with 2 tabs instead
of 3, causing PHPCS (Generic.WhiteSpace.ScopeIndent.IncorrectExact) and
PHP Insights (PSR2.ControlStructures.SwitchDeclaration.BreakIndent) to
fail in the Code Analysis check.
…add() fails
Revert the send_email() relocation. Keeping the pre-existing call before
the GDPR branch preserves the existing behavior where admin notifications
fire even if Entries::add() returns falsy.
{entry_id} continues to resolve in the confirmation message, redirect URL,
and downstream integrations (PDF, webhook) via the $form_data['entry_id']
injection after Entries::add(). In email bodies it now resolves to '' —
consistent with the GDPR do-not-store path and safer than the prior
behavior change.
Feature: add {entry_id} smart tag
…rency Fix: add PLN to currency dropdown
…-value-choice-fields Feature: Dynamic default value for dropdown and multi-choice fields
…lete-change Fix: Prevent phone field country flag from changing on autocomplete
…or-non-iframe-editor Fix: Background color not applied in non-iframe editor mode
…s-repeater-slug Fix: Dynamic options not working for dropdown/multi-choice inside repeater
The MCP settings page built the endpoint URL by concatenating `srfm_admin.site_url` with `/wp-json/sureforms/v1/mcp`. That string is incorrect on sites using Plain permalinks (which need `?rest_route=/sureforms/v1/mcp`), sites with a custom REST prefix via the `rest_url_prefix` filter, or other non-standard REST routing. - admin/admin.php: add `mcp_endpoint_url` to the srfm_admin localization, computed with `esc_url_raw( rest_url( 'sureforms/v1/mcp' ) )`. - src/admin/settings/pages/MCP.js: consume `srfm_admin.mcp_endpoint_url` instead of hand-building the path.
…nt-url fix: localize MCP endpoint REST URL via rest_url()
…to dev-nr-2.8.1-pre
Dev To Next Release 2.8.1
Version Bump 2.8.1
fix notices in survey page
Auto-generated by /i18n command on PR #2670
chore: update i18n translations
…2.8.1 Remove Repeater dynamic options bullet from 2.8.1 changelog
Removes leaked internal artifacts that have no value on the public WordPress.org-facing mirror:
- .claude/ (Claude Code harness)
- .scripts/git-hooks/ (developer-machine pre-commit hook)
- internal-docs/ (internal team wiki)
- CLAUDE.md, ARCHITECTURE.md, COMPREHENSIVE_ANALYSIS.md, PRODUCT_ANALYSIS.md, TECHNICAL_OVERVIEW.md (AI-generated internal docs)
- .github/workflows/{push-to-deploy,push-asset-readme-update,release-tag-draft,update-translations,release-pr-template}.yml (internal release/SVN automation referencing org secrets)
- bin/{build-zip.sh,checkout-and-build,i18n.sh} (internal build/CI helpers)
Kept on public:
- .wordpress-org/ (standard WP plugin convention)
- Contributor-facing CI (code-analysis, phpunit, test-coverage-check, playwright, insights)
- docs/ (public developer documentation)
- bin/install-wp-tests.sh and bin/check-test-coverage.sh (used by kept CI workflows)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sureformsrepository master branch into the public mirror.{entry_id}smart tag for emails, confirmations, PDFs, and integrationsTest plan