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
I have a form schema (an array with form components) that I am wrapping inside another bulk form using a layout component. The bulk form has a Select input field that allows me to target predefined target fields on the wrapped form. This will enable me to accept many values with Textarea, split by a new line, and then create multiple instances of the inner form pre-filled from a single input, the inner form acts as global pre-defined defaults.
This was working fine until the inner form started to use layout components (Grid, Tab, Section, etc.), at which point rejecting the target field from an array became more difficult.
// Works if fields are not nested, and don't contain layout componentcollect($formSchema)->reject(fn($field) => $field->getName() === 'target_field');
I wish to get a Form field from a schema without having to go looking for it myself recursively
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a form schema (an array with form components) that I am wrapping inside another bulk form using a layout component. The bulk form has a Select input field that allows me to target predefined target fields on the wrapped form. This will enable me to accept many values with Textarea, split by a new line, and then create multiple instances of the inner form pre-filled from a single input, the inner form acts as global pre-defined defaults.
This was working fine until the inner form started to use layout components (Grid, Tab, Section, etc.), at which point rejecting the target field from an array became more difficult.
I wish to get a Form field from a schema without having to go looking for it myself recursively
Beta Was this translation helpful? Give feedback.
All reactions