Is it allowed in Islam to have feelings for someone. What are the boundaries and restrictions?
In Islam, it is not a sin if you feel a special affinity or inclination towards a certain individual since human beings have no control on such natural inclinations. We are, however, definitely responsible and accountable if we get carried away by such feelings and take specific actions or steps that might be deemed as haram (forbidden).
As far as male and female interaction is concerned, Islam dictates strict rules: It forbids all forms of 'dating' and isolating oneself with a member of the opposite sex, as well indiscriminate mingling and mixing.
If, however, one does none of the above, and all that he or she wants is to seriously consider marrying someone, such a thing itself is not considered haram. In fact, Islam encourages us to marry persons for whom we have special feelings and affinity.
Islam recommends that potential marriage partners see one another before proposing marriage. Explaining the reason for such a recommendation, the Prophet (peace and blessings be upon him) said: "That would enhance/foster the bonding."
We are advised against getting carried away by merely the outward appearances of a person; these may be quite misleading. Marriage is a life-long partnership and a person's real worth is determined not by his or her physical looks, but more so by the inner person or character.
After having mentioned that people ordinarily look for beauty, wealth and family in a marriage partner, the Prophet (peace and blessings be upon him) advised us to consider primarily "the religious or character factor" over and above all other considerations.