Replies: 2 comments
-
Please can you clarify:
Modifying the forms of built-in Netbox views is not supported. As I understand it, Netbox 3.2 will let you create custom fields which reference other database objects. You might need to wait for that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have created a 'Custom Field' named 'Group' with a 'Type' of 'Multiple Selection' with a 'Content Types' of 'Circuits >provider'.
If I inspect the HTML in chrome, I can see:
I am trying to populate the choices.
I have the following receiver configured.
@receiver(models.signals.post_init, sender=Provider)
def my_group(sender, instance, **kwargs):
GROUP_CHOICES = [grp.name for grp in Group.objects.all()]
instance.custom_field_data['Group'] = SelectMultiple(choices=GROUP_CHOICES)
No choices appear at circuits/providers/add/ 'Custom Fields',' Group*'
What do I need to change in order to pre-populate the choices?
Beta Was this translation helpful? Give feedback.
All reactions