(form "00616" (position 4 2) (size 72 22) 
  (heading "MULTI ELEMENT COMPOSITING")
  (label (position  2  3) (foreground (user_option "form_text_highlight"))
                          (text "Define the output to produce"))
  (label (position  2  4) (text "Output to"))
  (label (position  2 8) (foreground (user_option "form_text_highlight"))
                          (text "Define the geological zones"))
  (label (position  2 9) (text "Zone selection method"))
  (label (position 2 10) (text "Waste interval treatment"))
  (label (position 42  9) (text "Min waste width"))
  (label (position  2 12) (text "Sample table name"))
  (label (position 42 12) (text "Max internal dilution"))
  (label (position  2 14) (foreground (user_option "form_text_highlight"))
                          (text "Define output composite parameters"))
  (label (position  2 15) (text "Composite reference point"))
  (label (position  2 16) (text "Minimum composite width"))
  (label (position  2 17) (text "Apply mining width"))
  (field "out_type" (position 13 4) (display_length 16) (input allowed)
    (translate upper) (null disallowed)
    (value_in "STRING FILE" "DATABASE TABLE")
    (default "STRING FILE")
    )
  (field "string_loc" (position 13  5) (display_length 26) (input allowed)
    (dependency (value "out_type") == "STRING FILE")
    (translate lower) (null allowed) (max_length 26)
    (file output (link "file_id") (extension "*.str"))
    )

  (field "database_table" (position 13  5) (display_length 15) (input allowed)
     (translate none) (max_length 18) (null disallowed)
     (dependency (value "out_type") == "DATABASE TABLE")
    )

  (field "log_file" (position 13  6) (display_length 30) (input allowed)
    (dependency (value "out_type") == "DATABASE TABLE")
    (translate lower) (null allowed) (max_length 252)
    (file (extension "reports|*.log"))
    (help "REPORT_FILE_NAME_TIP"))

  (field "l1" (position  2  5)
                           (display_length 10)
                           (foreground) (background)
                           (input disallowed)
                           (default "Location")
                           (dependency (value "out_type") == "STRING FILE"))
  (field "l2" (position  2  5)
                           (display_length 10)
                           (foreground) (background)
                           (input disallowed)
                           (default "Database table")
                           (dependency (value "out_type") == "DATABASE TABLE"))
  (field "l3" (position  2  6)
                           (display_length 10)
                           (foreground) (background)
                           (input disallowed)
                           (default "Log file")
                           (dependency (value "out_type") == "DATABASE TABLE"))
  (field "f1" (position  2  6)
                           (display_length 16)
                           (foreground) (background)
                           (input disallowed)
                           (default "ID number")
                           (dependency (value "out_type") == "STRING FILE"))

  (field "file_id" (position 13  6) (display_length 16) (input allowed)
    (translate upper) (format real_8) (null disallowed) (max_length 16)
    (dependency (value "out_type") == "STRING FILE")
    (help (field "string_loc")))
  (field "s1" (position  45  4)
                           (display_length 16)
                           (foreground) (background)
                           (input disallowed)
                           (default "String")
                           (dependency (value "out_type") == "STRING FILE"))
  (field "s2" (position  45  5)
                           (display_length 16)
                           (foreground) (background)
                           (input disallowed)
                           (default "No zone string")
                           (dependency (value "out_type") == "STRING FILE"))
  (field "s3" (position  45  6)
                           (display_length 16)
                           (foreground) (background)
                           (input disallowed)
                           (default "No sample string")
                           (dependency (value "out_type") == "STRING FILE"))

  (field "string_no" (position 57  4) (display_length  5) (input allowed)
    (low_bound 1) (high_bound 32000) (default "1")
    (format integer_4) (null disallowed) (max_length 5)
    (dependency (value "out_type") == "STRING FILE") 
    )
  (field "no_zone_string" (position 57  5) (display_length  5) (input allowed)
    (low_bound 1) (high_bound 32000) (default "2")
    (format integer_4) (null disallowed) (max_length 5)
    (dependency (value "out_type") == "STRING FILE") 
    )
  (field "no_sample_string" (position 57  6) (display_length  5) (input allowed)
    (low_bound 1) (high_bound 32000) (default "3")
    (format integer_4) (null disallowed) (max_length 5)
    (dependency (value "out_type") == "STRING FILE") 
    )

  (field "selection" (position 20  9) (display_length 18) (input allowed)
    (value_in "NO SELECTION" "MULTIPLE ZONES" "ZONE FROM TO")
    (translate upper) (null disallowed)
    )
  (field "waste" (position 20 10) (display_length  15) (input allowed)
    (value_in "INCLUDE WASTE" "IGNORE WASTE")
    (translate upper) (null disallowed) (max_length 20) 
    (default "INCLUDE WASTE")
    )
  (field "sm_cutoff" (position 57  9) (display_length 6) (input allowed)
           (format real_8) (default "0")
          )

  (field "table_name" (position 20 12) (display_length 15) (input allowed)
     (translate none) (max_length 18) (null disallowed)
    )
  (field "dilution" (position 57 12) (display_length  4) (input allowed)
    (low_bound 0) (high_bound 9999)
    (translate upper) (format real_8) (null disallowed) (max_length 4)
    )

  (field "outchoice" (position 20 15) (display_length  7) (input allowed)
    (value_in "bottom" "middle" "segment" "top")
    (translate lower) (null disallowed) (max_length 8) 
    )

  (field "min_width" (position 20 16) (display_length  4) (input allowed)
    (low_bound 0) (high_bound 999)
    (translate upper) (format real_8) (null disallowed) (max_length 4)
    )
  (field "apply_mining_width" (position 20 17) (display_length 3) (input allowed)
     (translate upper) (value_in "YES" "NO") (default "NO")) 
  (field "mcs" (position  2 18) 
         (display_length 18)
         (foreground) (background)
         (input disallowed)
         (dependency (value "apply_mining_width") == "NO")
         (default "Minimum composite spacing"))

  (field "min_spacing" (position 20 18) (display_length  4) (input allowed)
    (dependency (value "apply_mining_width") == "NO")
    (default "0")
    (low_bound 0) (high_bound 9999)
    (translate upper) (format real_8) (null disallowed) (max_length 4)
    )


  (field "an_pos" (position  2 18) 
         (display_length 18)
         (foreground) (background)
         (input disallowed)
         (dependency (value "apply_mining_width") == "YES")
         (default "Anchor position"))

  (field "anchor_position" (position 20 18) (display_length  10) (input allowed)
    (dependency (value "apply_mining_width") == "YES")
    (default "BOTTOM")
    (translate upper) (null disallowed)
    (value_in "TOP" "BOTTOM")
    )

  (field "mw" (position  2 19) 
         (display_length 18)
         (foreground) (background)
         (input disallowed)
         (dependency (value "apply_mining_width") == "YES")
         (default "Mining width"))

  (field "mining_width" (position 20 19) (display_length  8) (input allowed)
    (dependency (value "apply_mining_width") == "YES")
    (default "0.001")
    (low_bound 0.001) (high_bound 9999)
    (translate upper) (format real_8) (null disallowed)
    )


  (label (position 42 14) (foreground (user_option "form_text_highlight"))
                          (text "Define optional weighting fields"))

  (scroll_block "weighting_fields" (position  42  16) (size 24  3)
     (extra  0  1)
     (scroll_size 24 5)
     (repeat interactive (grow  0  1) (instances  1 (min  1) (max 5)))
    (top
      (label (position  1  0) (text "Field Name"))
      (label (position  14  0) (text "Default value"))
    )
    (main
  (field "weighting_field" (position 1 0) (display_length 10) 
          (input allowed)
          (null allowed) (max_length 18)
          )

  (field "weighting_default" (position 14 0) (display_length 6) 
          (input allowed) (default "1")
          (low_bound 0.0) (null disallowed) (max_length 10)
          )
    )
  )

  (default_buttons)
)
