(form "21320" (size 76 19)
    (heading "DRILLHOLE ORE/WASTE DISCRIMINATION")

    (label (position 2 3) 
        (text "Interval table" )
    )
    (field "table_name"
        (position 14 3)
        (display_length 13)
        (max_length 20)
        (input allowed)
        (null disallowed)
        )

    (label (position 2 4) 
        (text "Digging zones" )
    )
    (field "dz_type"
        (position 14 4)
        (display_length 17)
        (max_length 20)
        (input allowed)
        (value_in exclusive "None" "Truck & Shovel" "Dragline")
        (default "None")
        )

    (label (position 38 4) 
        (text "Maximise")
    )
    (field "objective"
        (position 47 4)
        (display_length 16)
        (max_length 20)
        (input allowed)
        (auto_next off)
        (value_in exclusive "Ore Volume" "Ore Grade" "Contained Product")
        (default "Contained Product")
        )

    (field "dz_depth_label" 
        (position 2 5)
        (display_length 22)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (value_in "Depth to lower zone")
        (default "Depth to lower zone")
        (dependency (value "dz_type") == "Dragline")
    )
    (field "dz_depth"
        (position 25 5)
        (display_length 6)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (auto_next off)
        (default "0")
        (dependency (value "dz_type") == "Dragline")
        )

    (label (position 20 7) 
        (text "Ore" )
    )
    (label (position 30 7) 
        (text "Waste" )
    )

    (label (position 2 8) 
        (text "Minimum thicknesses" )
    )
    (field "ore_thick0"
        (position 20 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "waste_thick0"
        (position 30 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "ore_thick1"
        (position 20 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help (field "ore_thick0"))
    )
    (field "waste_thick1"
        (position 30 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help (field "waste_thick0"))
    )
    (field "ore_thick2"
        (position 20 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help (field "ore_thick0"))
    )
    (field "waste_thick2"
        (position 30 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help (field "waste_thick0"))
    )
    (field "upper_zone"
        (position 40 8) 
        (display_length 15)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (value_in "upper zone" )
        (browser none)
        (default "upper zone")
        (dependency (value "dz_type") != "None")
    )
    (field "middle_zone"
        (position 40 9) 
        (display_length 20)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (value_in "middle zone" )
        (browser none)
        (default "middle zone")
        (dependency (value "dz_type") != "None")
    )
    (field "lower_zone"
        (position 40 10) 
        (display_length 20)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (value_in "lower zone" )
        (browser none)
        (default "lower zone")
        (dependency (value "dz_type") != "None")
    )
    (label 
        (position 2 11) 
        (text "Attributes to composite ")
    )
    (label 
        (position 2 12) 
        (text "(list master first)")
    )
    (scroll_block "attributes"
        (position 2 14)
        (size 24 3)
        (extra 0 1)
        (scroll_size 24 50)
        (repeat interactive
            (grow 0 1)
            (instances 0
                (min 1)
                (max 50)
            )
        )
        (top
            (label
                (position 10 0)
                (text "Attribute")
            )
            (label
                (position 1 0)
                (text "D-Field")
            )
        )
        (main
            (field "quality"
                (position 10 0)
                (display_length 12)
                (max_length 30)
                (input allowed)
                )
            (field "dfield"
                (position 1 0)
                (display_length 6)
                (background)
                (max_length 30)
                (input disallowed)
                (auto_next off)
            )
        )
    )
    (label (position 30 12) 
        (text "Cutoff" )
    )
    (field "cutoff"
        (position 52 12)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )

    (label (position 30 13)
        (text "Result file" )
    )
    (field "rid"
        (position 48 11)
        (display_length 13)
        (background (user_option "form_background"))
        (foreground (user_option "form_background"))
        (max_length 4)
        (null disallowed)
    )
    (field "fname"
        (position 52 13)
        (display_length 13)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null disallowed)
        (file output (link "rid") (extension trim "*.not,*.str"))
    )

    (label (position 30 14)
        (text "REPORT_FILE_NAME" )
    )
    (field "report_file"
        (position 52 14)
        (display_length 26)
        (max_length 252)
        (input allowed)
        (translate lower)
        (null disallowed)
        (file output (extension trim "reports|*.log"))
        (help "REPORT_FILE_NAME_TIP"
        )
    )
    (field "report_format" (position 52 15) (display_length 16)
      (input allowed) (null disallowed)
      (value_in ".not - Surpac Note File"
                ".csv - Comma Separated (Spreadsheet)"
                ".htm - Hypertext Markup Language (Web)"
                ".html - Hypertext Markup Language (Web)"
                ".rtf - Rich Text Format (Microsoft Word)"
                ".pdf - Adobe Acrobat"
                ".ps - Postscript"
                ".log - Surpac log file"))
    (label (position 30 14)
        (text "Zone selection method" )
    )
    (field "selection"
        (position 52 14)
        (display_length 16)
        (max_length 20)
        (input allowed)
        (translate upper)
        (null disallowed)
        (value_in "MULTIPLE ZONES" "ZONE FROM TO" "NO SELECTION")
        (default "MULTIPLE ZONES")
        (auto_next off)
        )

    (label (position 30 15)
        (text "Missing data method" )
    )
    (field "missing_samples"
        (position 52 15)
        (display_length 21)
        (max_length 17)
        (input allowed)
        (translate upper)
        (null disallowed)
        (value_in "ASSIGN CONSTANT" "WEIGHTED AVERAGE" "ARITHMETIC AVERAGE")
        (default "ASSIGN CONSTANT")
        )

    (field "constant_label"
        (position 30 16) 
        (display_length 15)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (value_in "Constant value" )
        (browser none)
        (default "Constant value")
        (dependency (value "missing_samples") == "ASSIGN CONSTANT")
    )
    (field "constant"
        (position 52 16)
        (display_length 14)
        (max_length 16)
        (input allowed)
        (low_bound 0)
        (format real_8)
        (null disallowed)
        (default "0.0")
        (dependency (value "missing_samples") == "ASSIGN CONSTANT")
    )    

    (default_buttons)
)
