Let's say I have this model:
class Foo(models.Model):
bar = models.ForeignKey(Bar)
currency = models.ForeignKey(Currency) # currency is just an example
is_active = models.BooleanField()
Now suppose Foo is an Inline of Bar. And I would always want to indicate a value on each currency? If I could replace those currency drop down menus with a widget that just returns the name as text with a hidden field. So for example, on an add page, instead of having the inline show this:
- currency drop down menu is_active checkbox
- currency drop down menu is_active checkbox
- currency drop down menu is_active checkbox
have it show this:
- currency name 1 is_active checkbox
- currency name 2 is_active checkbox
- currency name 3 is_active checkbox
- currency name 4 is_active checkbox
- currency name 5 is_active checkbox
What would be the right approach to accomplish that? I assume I would have to override some form class method. Thanks.