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

Matt Sones
Matt Sones 💎💎💎
edited August 17, 2019 in Questions
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?


  • Zach McElrath
    edited October 27, 2017
    Fortunately the answer to this one is incredibly simple:

    addFieldToModel: true



       type: "field",
       id: "importantfield",
       modelprop: "model",
       addFieldToModel: true,
  • Matt Sones
    Matt Sones 💎💎💎
    edited October 27, 2017
    Love it!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!