Skip to content
Chris French edited this page Apr 16, 2014 · 1 revision

Useful non saving form inputs

if you need to post something in a form but don't want it to ever ever ever get saved to a mongo collection, prefix the form field with two underscores: eg. __products when you post the form & it binds to the Model, the form field's values are accessible to you in the model (e.g. as $model->__products), but when it gets saved to mongo, all fields that start with two underscores are ignored.