code: public int indexOf(String name) {
  		int i = 0;
  		for (FormItem formItem : this) {
  			if (name.equals(formItem.getName())) {
  				return i;
  			}
  			i++;
  		}
  		return -1;
  	}
docs: Get the index of the field with given name.
  
  @param name field name
  @return index