Online recommendation for an applicant who is not the recommender's student
He told me that in the online recommendation form they asked him some questions like "Which courses has he/she taken with you?" or "How do you rank the applicant among all your students?" and he does not know what to say.


Well, he should say "kasramsh has never been my student". What else could he truthfully say?


  Should he leave them blank and just write the recommendation letter? 


He shouldn't leave them blank but answer them truthfully. "I know kasramsh from [...]. He has never been my student.". Somewhere in the letter, the relationship betweem recommender and student should be explained anyway.


  Would this not be perceived negatively?


Maybe, maybe not. Anyway, it is the way it is, and there is no way how you can spin it that the target institution would not figure out that you are not your recommender's student.