Show/Hide an Input Field based on a conditional when making an Addon I am writing a Blender Add-on which takes properties from configuration file and generates a tree based on the customization. The Add-On allows tweaking of certain properties, most notably whether the tree is monopodial (one canopy) or sympodial (multiple canopies).

If the tree is sympodial, I want the user to be able to select how many canopies are present in the Add-On. If the tree is monopodial, I want the fields to either be hidden or greyed out/locked for editing.

I've tried something like

row = box.row()
row.prop(scn, "Tree_Form")
if (tree_form == "Sympodial")
    row = box.row()
    row.prop(scn, "Num_Canopies")


But I haven't had success. Admittedly, I am a complete novice to Python and Blender Add-Ons in general.
Try this:

row = box.row()
row.prop(scn, "Tree_Form")
if scn.Tree_Form == "Sympodial": # the ':' is required
    row = box.row()
    row.prop(scn, "Num_Canopies")