To determine the number of the current field, call the function curitemnum():
int curitemnum(fmp) FORMPTR fmp; /* Menu form being processed */