Skip field
Created 6 years ago by czorny813Hi,
How set value in field (skip field) in controller to my form when create item in DB.
Thanks.
ryanthompson
—
6 years ago
Hey! You can interact with your builder in a number of ways - one of which is setting skips (an attribute) or simply adding one:
$builder->setSkips((array)$fieldSlugs);
$builder->skipField($fieldSlug);
Do this BEFORE calling make/render/build.
ryanthompson
—
6 years ago
Best Answer
Just set it onSaving in your builder. Just like pages module: https://github.com/anomalylabs/pages-module/blob/2.3/src/Page/Form/PageFormBuilder.php#L59
I think there is now even a setFormEntryAttribute($field, $value)
available to make things even cleaner looking.
Just set it onSaving in your builder. Just like pages module: https://github.com/anomalylabs/pages-module/blob/2.3/src/Page/Form/PageFormBuilder.php#L59
I think there is now even a
setFormEntryAttribute($field, $value)
available to make things even cleaner looking.