Add a field to a model from a custom component field property

In Skuid (most of the time) when I add a rendering condition on a field using a 'field' property in a component, skuid will add that field to the model definition.
I want to do something similar in my custom component. I have a field property, and when the user chooses a field I want to make sure it's in the field property's model, and if it isn't, add it.
How would I go about that?
I want to do something similar in my custom component. I have a field property, and when the user chooses a field I want to make sure it's in the field property's model, and if it isn't, add it.
How would I go about that?
Tagged:
2
Categories
- 7.9K Questions
- 926 Ideas
- 220 Discussion Categories
- 178 General
- 9 Community Feedback
- 3 Community Info
- 18 Knowledge Base
Comments
addFieldToModel: true
e.g.
{
type: "field",
id: "importantfield",
modelprop: "model",
addFieldToModel: true,
}