(form "21330" (size 65 22)
    (heading "DRILLHOLE REDUCTION & DILUTION")

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

    (label 
        (position 2 3)
        (text "Digging zones")
    )
    (field "dz_type"
        (position 14 3)
        (display_length 13)
        (max_length 15)
        (input allowed)
        (value_in "None" "Truck & Shovel" "Dragline")
        (default "None")
        )

    (label (position 36 3)
        (text "Use volume factor?" )
    )
    (field "use_vol"
        (position 55 3)
        (display_length 2)
        (max_length 4)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (value_in "Yes" "No")
        (default "No")
        )

    (field "dz_depth_label" 
        (position 2 4)
        (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 19 4)
        (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 2 6)
        (Text "Thicknesses" )
    )

    (label (position 20 6)
        (text "Top" )
    )

    (label (position 14 7) 
        (text "Dilution" )
    )
    (label (position 23 7)
        (text "Reduction" )
    )

    (label (position 40 6)
        (text "Bottom" )
    )

    (label (position 35 7) 
        (text "Dilution" )
    )
    (label (position 44 7) 
        (text "Reduction" )
    )

    (field "col_label"
        (position 4 8) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "Interval")
    )
    (field "ore_label0"
        (position 4 9) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "Ore layer")
    )
    (field "ore_label1"
        (position 4 10) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "Ore layer")
        (dependency (value "dz_type") != "None")
    )
    (field "ore_label2"
        (position 4 11) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "Ore layer")
        (dependency (value "dz_type") != "None")
    )
    (field "top_dil"
        (position 14 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "top_red"
        (position 23 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "bottom_dil"
        (position 35 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "bottom_red"
        (position 44 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "top_dil_thk0"
        (position 14 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "top_red_thk0"
        (position 23 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "bottom_dil_thk0"
        (position 35 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "bottom_red_thk0"
        (position 44 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "top_dil_thk1"
        (position 14 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "top_dil_thk0")
        )
    )
    (field "top_red_thk1"
        (position 23 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "top_red_thk0")
        )
    )
    (field "bottom_dil_thk1"
        (position 35 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "bottom_dil_thk0")
        )
    )
    (field "bottom_red_thk1"
        (position 44 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "bottom_red_thk0")
        )
    )
    (field "top_dil_thk2"
        (position 14 11)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "top_dil_thk0")
        )
    )
    (field "top_red_thk2"
        (position 23 11)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "top_red_thk0")
        )
    )
    (field "bottom_dil_thk2"
        (position 35 11)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "bottom_dil_thk0")
        )
    )
    (field "bottom_red_thk2"
        (position 44 11)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "bottom_red_thk0")
        )
    )

    (field "upper_zone"
        (position 52 9) 
        (display_length 10)
        (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 52 10) 
        (display_length 10)
        (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 52 11) 
        (display_length 10)
        (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 12)
        (text "Attributes to composite")
    )
    (label 
        (position 2 13) 
        (text "(list master first)")
    )
    (scroll_block "attributes"
        (position 2 15)
        (size 24 2)
        (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 48 12)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )

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

    (field "report_file"
        (position 48 12)
        (display_length 26)
        (max_length 252)
        (translate lower)
        (input allowed)
        (null disallowed)
        (file output (extension trim "reports|*.not")
        )
        (help   "REPORT_FILE_NAME_TIP"
        )
    )

    (field "report_format" (position 48 13) (display_length 24)
      (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 "constrain"
        (position 48 14)
        (display_length 14)
        (max_length 14)
        (input allowed)
        (null disallowed)
        (value_in "MULTIPLE ZONES" "ZONE FROM TO" "NO SELECTION")
        (default "MULTIPLE ZONES")
        (auto_next off)
        )

    (field "missing_samples"
        (position 48 15)
        (display_length 15)
        (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 48 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")
    )

    (label
        (position 12 18)
        (text "Input string file" )
    )

    (label
        (position 2 19)
        (text "Location" )
    )
    (field "strname"
        (position 12 19)
        (display_length 12)
        (max_length 40)
        (translate lower)
        (input allowed)
        (file (link "rid")
            (extension trim "*.str")
        )
        )
    (label
       (position 2 20)
       (text "File id" )
    )
    (field "rid"
        (position 12 20)
        (display_length 10)
        (input allowed)
        (max_length 4)
        (null disallowed)
        )

    (label
        (position 30 19)
        (text "Change WASTE above cutoff to ORE?")
    )
    (field "chg_to_ore"
        (position 58 19)
        (display_length 2)
        (max_length 4)
        (input allowed)
        (null disallowed)
        (value_in "Yes" "No")
        (default "Yes")
        )

    (label
        (position 30 20)
        (text "Change ORE below cutoff to WASTE?")
    )
    (field "chg_to_waste"
        (position 58 20)
        (display_length 2)
        (max_length 3)
        (input allowed)
        (null disallowed)
        (value_in "Yes" "No")
        (default "Yes")
        )

    (label (position 30 15)
        (text "Missing data method" )
    )

    (default_buttons)
)
