(form "20511" (size 36 19)
  (heading "DATA SOURCE SPECIFICATIONS")
  (label (position  2  3) (text "Data source type"))
  (field "string_label" (position  2  5) (display_length 10) 
    (foreground(user_option "form_text_highlight"))   
    (background)
    (input disallowed)
    (dependency (value "datasrc") == "STRING FILE")
    (default "STRING FILE"))

  (field "location_label" (position  4  6) (display_length 8)
    (background)
    (input disallowed)
    (dependency (value "datasrc") == "STRING FILE")
    (default "Location"))
  (field "id_label" (position  4  7) (display_length 8) 
    (background)
    (input disallowed)
    (dependency (value "datasrc") == "STRING FILE")
    (default "Id range"))
  (field "range_label" (position  4  8) (display_length 8) 
    (background)
    (input disallowed)
    (dependency (value "datasrc") == "STRING FILE")
    (default "String range"))
  (field "block_label" (position  2  5) (display_length 10) 
    (foreground(user_option "form_text_highlight"))
    (background)
    (input disallowed)
    (default "BLOCK MODEL"))
  (field "model_label" (position  4  6) (display_length 8) 
    (background)
    (input disallowed)
    (default "Model name"))

  (label (position  2 10) (text "Constrain data"))
  (field "datasrc" (position 18  3) (display_length 13) (input allowed)
    (value_in "STRING FILE" "BLOCK MODEL") (default "STRING FILE")
    (auto_next off)
    (translate upper) (null disallowed) (max_length 12) 
    )
  (field "location" (position 16  6) (display_length 10) (input allowed)
    (translate lower) (null disallowed) (max_length 26)
    (file (link "id") (extension "*.str"))
    (dependency (value "datasrc") == "STRING FILE")
    )
  (field "id" (position 16  7) (display_length 10) (input allowed)
    (translate upper) (format range) (null allowed) (max_length 32)
    (default " ") (dependency (value "datasrc") == "STRING FILE")
    (help (field "location")))
  (field "range" (position 16  8) (display_length 10) (input allowed)
    (format range) (null disallowed) (max_length 26) (default "1")
    (dependency (value "datasrc") == "STRING FILE")
    (help (field "location")))
  (field "model" (position 16  6) (display_length 15) (input allowed)
    (translate lower) (null disallowed) (max_length 40)
    (dependency (value "datasrc") == "BLOCK MODEL")
    )
  (field "constrain"(position 12 10)(display_length  1)(input allowed)
    (value_in "Y" "N") (default "N")
    (translate upper) (null disallowed) (max_length 1)
    )
  (field "save_points" (position 12 11) (display_length  1) (input allowed)
    (dependency (value "constrain") == "Y")
    (value_in "Y" "N")
    (default "N") (translate upper) (null allowed) (max_length 1)
    )
  (field "point_location" (position 12 12) (display_length 15) (input allowed)
    (translate lower) (null allowed) (max_length 40)
    (file output (link "id") (extension "*.str"))
    (dependency (value "save_points") == "Y")
    )
  (field "point_id" (position 12 13) (display_length 10) (input allowed)
    (translate upper) (format real_8) (null disallowed) (max_length 16)
    (default "1")
    (dependency (value "save_points") == "Y")
    (help (field "point_location")))
  (scroll_block "atts"
    (position 2 13)
    (size 30 4)
    (extra 0 1)
    (scroll_size 30 20)
    (repeat interactive
      (grow 0 1)
      (instances 1
        (min 1)
        (max 20)
      )
    )
    (top
      (label (position 13  0)
        (background)
        (text "Data source type"))
      (label
        (position 1 0)
        (background)
        (text "Attribute to fill"))
      (label (position 13  0)
        (background)
        (text "Description field"))
      (label (position 13  0)
        (background)
        (text "Attribute name"))
      (label (position 13  0)
        (background)
        (text "Dist to nearest sample"))
      (label (position 13  0)
        (background)
        (text "Ave dist to samples"))
      (label (position 13  0)
        (background)
        (text "Number of samples"))
      )
    (main
      (field "data_src_type"(position 13  0)(display_length 15)(input allowed)
        (value_in "STRING FILE" "BLOCK MODEL") (default "STRING FILE")
        (max_length 30)(translate upper)
        (help(field "model")))
      (field "att" (position 1 0) (display_length 10) (input allowed)
        (max_length "BM_MAX_ATT_NAME_LEN")
        )
      (field "field"(position 13  0)(display_length  3)(input allowed)
        (low_bound 1)(high_bound 100)(default "1")
        (format integer_4)(max_length 30)
        (help(field "location")))
      (field "attribute"(position 13  0)(display_length 15)(input allowed)
        (translate lower)(max_length "BM_MAX_ATT_NAME_LEN")
        (help(field "model")))
      (field "dist_att"(position 13  0)(display_length 15)(input allowed)
        (translate lower)(null allowed)(max_length "BM_MAX_ATT_NAME_LEN")
        (help(field "model")))
      (field "avgdist_att"(position 13  0)(display_length 15)(input allowed)
        (translate lower)(null allowed)(max_length "BM_MAX_ATT_NAME_LEN")
        (help(field "model")))
      (field "numsam_att"(position 13  0)(display_length 15)(input allowed)
        (translate lower)(null allowed)(max_length "BM_MAX_ATT_NAME_LEN")
        (help(field "model")))
      )
    )
  (default_buttons)
)
