Django Treebeard on how to use 'Position' and 'Relative to' in a customized form

52 Views Asked by At

I'm using treebeard and the materialized path trees to give tech support the ability to create troubleshooting guides. Each parent node will be the title of the guide and descendants of that parent node will be the steps to take. I've made a model to inherit from MP_Node with a few additional fields that I will be using to help create these guides such as name, description, step_type, etc. The form I've made for this is inheriting from the MoveNodeForm class which allows you to define the Position and Relative to fields that come with the class. It seems to me that the only way to access those fields is to call the entire form in the template like so {{ form|crispy }}. I would like to be able to use my form in a way where im calling each field one at a time so that I can make custimizations such as a RadioSelect for my step_type field, otherwise it will display as a dropdown in the form. Is there a way to access these fields Position and Relative to without calling the entire form? Can I not access those fields in my customized form class so that I can maybe change how the user interacts with it or to change up the field name?

0

There are 0 best solutions below