You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Give create-form the builder's defaults: anti-spam on and an email action - #3600
Broken: forms made through the create-form ability had anti-spam off and no email action. Forms made in the builder get both.
Changed
FrmAbilitiesFormsController::execute_create_form() sets options[antispam] = 1 unless the caller passed options.antispam, so an explicit 0 stays off.
It then calls FrmFormsController::create_default_email_action(), skipped when is_template or parent_form_id is set. That method is now public instead of copied, and still runs the frm_create_default_email_action filter.
Builder code path is unchanged apart from the method's visibility.
Verified: Lite's local PHPUnit can't run here, so CI is the red/green. Test-only commit: the new defaults test failed on all 4 PHPUnit jobs (Anti-spam should be on by default, 0 is not 1). With the fix, all 4 pass, plus PHPCS, PHPStan, Psalm, Mago, Rector and PHP CS Fixer.
The other three new tests (explicit antispam = 0, template and child form skip, filter returning false) pass before and after; they guard the edges of the change. Not run end to end through an MCP client.
We reviewed changes in 1927ae3...6f81b26 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
The reason will be displayed to describe this comment to others. Learn more.
Approve. create-form now matches the builder on both points the issue lists, and nothing else changed.
Reproduced live (Playground, Lite only), base vs this PR, calling execute_create_form() as an admin:
Input
Base
PR
no options
antispam 0, 0 email actions
antispam 1, 1 email action
options.antispam = 0
0, 0 actions
0 kept, 1 action
options.antispam = '0'
'0', 0 actions
'0' kept, 1 action
options.submit_value = 'Go'
antispam 0
antispam 1, submit_value still 'Go'
is_template = 1
0 actions
0 actions
parent_form_id set
0 actions
0 actions
The test-only commit (53f3380) failed PHPUnit on 7.4 and the other jobs were cancelled behind it; at the head all four PHPUnit jobs, Psalm and the syntax checks pass. Source read: the builder (build_new_form()) sets antispam to 1 and calls the same create_default_email_action(), so this is the shared path, not a copy, and the frm_create_default_email_action filter still applies. Making the method public is the only builder-side change.
Not run: the filter-returning-false test locally (CI covers it), an MCP client end to end, Pro.
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
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.
Fixes Strategy11/formidable-pro#6859
Broken: forms made through the
create-formability had anti-spam off and no email action. Forms made in the builder get both.Changed
FrmAbilitiesFormsController::execute_create_form()setsoptions[antispam] = 1unless the caller passedoptions.antispam, so an explicit0stays off.FrmFormsController::create_default_email_action(), skipped whenis_templateorparent_form_idis set. That method is now public instead of copied, and still runs thefrm_create_default_email_actionfilter.Verified: Lite's local PHPUnit can't run here, so CI is the red/green. Test-only commit: the new defaults test failed on all 4 PHPUnit jobs (
Anti-spam should be on by default, 0 is not 1). With the fix, all 4 pass, plus PHPCS, PHPStan, Psalm, Mago, Rector and PHP CS Fixer.The other three new tests (explicit
antispam = 0, template and child form skip, filter returning false) pass before and after; they guard the edges of the change. Not run end to end through an MCP client.🤖 Generated with Claude Code