Replies: 3 comments 3 replies
-
I believe that such a feature can be implemented. However, with a Btw. what is the ue-case where this is needed? |
Beta Was this translation helpful? Give feedback.
-
My use case is to have a single form to create instances of different Child models of the same model (selected based on a ChoiceField). Thus, the relevant fields change dynamically, and one of the child models has a many-to-one relation, which the others don't have. The rest of the data changing from model to model can be handled by Fields, and thus be hidden dynamically, but not the FormCollection handling the many-to-one relation. |
Beta Was this translation helpful? Give feedback.
-
i would also love to have a feature like this, I have a use case where i need a standalone formcollection to be able to create a model instance with foreign keys in one form (say for example a BookFormCollection that has a BookInfoForm, an AuthorForm, and a PublisherForm as it's attributes, so there is a page where you can just create books), but then in another form collection, i need a field where you can either show a selectize to select an existing instance of the first collection or create a new one using an embedded subform of the first form collection (like a ProfileFormCollection that has a ProfileInfoForm, a SelectOrCreateForm, a SelectBookFieldset and a BookFormCollection as it's attributes so you can create a profile and either select an existing book to display on your profile or create a new one from within the same profile form), so here the SelectOrCreateForm could be some radio buttons or a check box, the SelectBookFieldset could be a Selectize that has a hide_condition dependent on the value of SelectOrCreateForm, so it would be really useful if the BookFormCollection also had a hide condition feature |
Beta Was this translation helpful? Give feedback.
-
I am using df-show/df-hide on fields/fieldsets to hide some stuff dynamically, and was wondering if there was a way to hide FormCollections in the same way.
More precisely, I'm using a form collection with siblings to handle a One-To-Many relation, but this is only useful when some other condition on the form is met, and I would like to hide the whole form collection otherwise.
Beta Was this translation helpful? Give feedback.
All reactions