In my InputScript I first check the entered data (before processing the first screen command). I use the "Return" command to send an error message. This works well. In addition, I would like to put the cursor on the InputField where the user entered the wrong value. How can I achieve this?

In your script, add the commands

if V[my_cursor_fieldname] 
  SetCursor "&V[my_cursor_fieldname]" 
  Set V[my_cursor]  "" 

after all InputFields.

In the InputScript put the InputField label, enclosed by square brackets, into the variable V[my_cursor]:

if  V[VA_days>21]
  set V[my_cursor_fieldname] "F[Days]"
  Return "E: Number of days must between 1 and 21"  -statusline