I want to extend one field from add form, to be able to choose option from select list got by external API. Let me explain the question. I've got model like this:
class ContactGroup(Model):
id = Column(Integer, primary_key=True)
name = Column(String(50), unique=True, nullable=False)
my_field_id = Column(Integer, nullable=False)
def __repr__(self):
return self.name
When I want to add new entity, by default form created by app-builder, I have to specify my_field_id "by hand". So my question is, can I extend my_field_id to instead of specifying integer I will have a select list with data returned by external API. Api is providing data as a json, ex.:
{
data: [
{
id: 1,
name: "My field"
}
...
]
}
Or is it too complicated for default app-builder forms and I have to rewrite add form completely?
Thanks!