OctoberCMS: How To Prevent A Form Filed From Being Saved Into Database?
I've got a form fields definition file like the following:
fields: pivot[hall]: label: Hall type: text span: auto pivot[booth]: label: Booth type: text span: auto booth_picker: label: Select Booth type: boothpicker span: full
The third field is only a form widget which provides a convenient visual way to set the value of
booth field. Therefore, I do not need the
booth_picker field to be submitted and saved into database because there is no such field in the table. Only
booth need to be submitted and saved. I am currently getting this error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'booth_picker' in 'field list' (SQL: update
updated_at= 2016-12-15 13:14:44,
How can I prevent this helper field from being submitted? Or maybe there is a way of removing this field before the model is saved into database?
try to add underscore before your field name (new October Cms feature so perhaps you need to upgrade it to version 382)
edit : im not sure but it seems this feature doesnt work with checkbox field :-(
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?