ConditionalLogic
1 hooks fired by ConditionalLogic: 1 filters and 0 actions across 1 call sites.
1 hooks fired by ConditionalLogic: 1 filters and 0 actions across 1 call sites. 1 of the 1 call sites are described by a docblock, at the call or on the constant that names the hook; the rest are listed with their signature and call sites only. Paths are relative to the plugin directory.
xpac_forms_submission_invisible_blocks
Filter · 2 arguments · 1 call site
Filters the field names this submission should treat as not shown to the visitor.
Fired from removeConditionalData() while "xpac_forms_initialize_submission" runs, so from inside the Submission constructor - before validation, before uploads and before any pre_submit or submit callback. It runs once per pass, and there is a pass for as long as the previous one removed something: the first sees the request data whole, each later one sees it with the earlier removals applied, which is what resolves a conditional wrapper nested inside another one. Nesting is resolved to any depth, so a listener here must expect to be called more than twice and must be idempotent.
Every name in the returned array is dropped from both Submission::getData() and Submission::getRules(), and is marked unavailable for later conditional passes and action conditions. Adding a name therefore discards that field's answer from the stored entry, removes its validation rules and prevents a hidden optional control from resolving as an empty visible field. Names are field "name" attributes, matching the keys Submission::filterBlocks() produces.
This is the only point at which a field can be removed before validation, and it exists only while this plugin is active. Multi-Step Form attaches here to add the fields of steps its own skip logic excluded (packages/MultiStepForm/Addon.php:18-23), so with Conditional Logic inactive those fields are never removed.
apply_filters( 'xpac_forms_submission_invisible_blocks', $invisible_blocks, $submission )$invisible_blocks(array) — Field names already resolved as not shown by the conditional wrappers in this form.$submission(Submission) — The submission being initialised.
Fired from:
packages/ConditionalLogic/Forms/Addon.php:474