A. Couples showing affection in public:
Some Poskim rule it is forbidden even for a couple to affectionately touch each other in front of other people. [Thus, one may not hold hands, dance, hug, or kiss in public. Practically, so is the final ruling, and so is the custom amongst all G-d fearing Jews.]
B. Relatives showing affection in public:
It is permitted for a father/mother/grandfather/grandmother to engage in non-affectionate touch with their daughter/son/granddaughter/grandson even in public. [It is possible to learn in the Poskim that it is however forbidden for them to engage in affectionate touch in public, such as hugging and kissing. On the other hand one can argue that affectionate touch between such close relatives does not lead others to any immoral thoughts. Practically, since in most situations it is not obvious to others that the two are father/daughter etc one is to be stringent, and so rule some Rabbanim of today. However for a parent/grandparent to hug their young child in public is certainly permitted.]
Walking together in public:
May one show affection in front of children:
Educational aspect: Arguments pro and against showing affection in front of one’s children have been given from an educational perspective. Some claim doing so is a positive thing that helps one’s children know that the parents love each other, and introduce love to their lives. Others counter that doing so makes the children uncomfortable, as they are not interested in seeing a display of intimacy between their parents. It can also lead the child to have a heightened desire for his own intimacy for a partner, prior to marriage. One can educate one’s children in showing love and teach them that their parents love each other by performing acts of kindness to each other in their presence, and speaking respectfully to one another. Practically, as stated above, it is forbidden to show affectionate touch in front of others which would include one’s children.
How to explain public intimacy when witnessed by one’s children?
May one touch in public in an area without Jews?
May one clean something from his wife’s hair in public?
 Rama Even Haezer 21/5
 Nemukei Yosef Baba Basra 186b, based on story of Rav Benah and Eliezer, brought in Baba Basra 58a
 The reason: As it is not modest for a couple to be engaged in affection in public. In addition doing so will cause others to have erotic thoughts of them. [Taz 21/1]
 Kitzur SHU”A 152/11
 Beis Shmuel 21/12; Taz 21/1; Rashba 1188
Other opinions: Some Poskim rule it is permitted to check each other’s hair for lice in public so long as the head does not rest on ones body. [Derisha, brought in Taz ibid]
 The reason: As although it is not considered an act of affection which is immodest to do in public. Nevertheless, doing so will cause others to have erotic thoughts of them, as it reminds them of their intimacy. [ibid]
 See Beis Shmuel 21/12; Taz 21/1 that by the above relatives doing acts of non-affection acts in public [such as checking each other’s hair] does not arouse immoral thoughts being that everyone understands that they do not share an incestuous relationship.
 As the above Poskim only permitted these relatives to check lice in public, which is not an affectionate touch, while by an affectionate touch, such as hugging and kissing, certainly it can arouse immoral thoughts in the onlooker.
 So is implied from the ruling of the Taz and Beis Shmuel ibid that there is no Zichron Tashmish by such relatives
 So rules Hagaon HaRav Yaakov Yosef Zal, stating that those fathers who hug their older daughters in public are Amei Haretz and are causing others to stumble.
 Pashut, as people do not view this erotically.
 See Brachos 43b that one is not to speak with his wife or daughter or sister in the marketplace; See Az Nidbaru 4/65 that the intent is that one must act in a modest manner; See Mishneh Halachos 10/217
 There is no unique Halacha that limits the showing of affection in front of children or that excludes children from the above law that prohibits affectionate touch in front of others. Thus, seemingly, children are included in the above prohibition of showing affection in front of “others.” Now, there are two reasons behind the prohibition against showing affection before others; 1) Tzenius and 2) Hirhur. [See Taz ibid] Thus, it would be forbidden for the couple to engage in immodest affectionate touch in front of children who can speak [see below], while acts of touch that are not immodest necessarily would be permitted to perform in front of children until the child has reached an age to comprehend the concept of marital relations and thus may lead him to Hirhur. Vetzaruch Iyun from the Halacha that parents may be naked and sleep naked with their kids until the age of embarrassment, which is approximately 11-12 years of age. [Admur 73/3; Michaber E.H. 21/7] One must however conclude that there is a difference between being undressed in front of others and showing affection in front of others, as is seen from the fact that men may bathe together, and sleep under blankets, even though showing affection in front of them is forbidden due to Tzenius.
The age from which the prohibition begins: It is forbidden to perform marital relations before any human being that has reached the age that they can speak. [Michaber 240/6] Seemingly this same age would apply regarding showing affectionate touch in front of a child who has a reached this age.
 The reason: As doing so is immodest and may lead gentiles to have immoral thoughts also have a prohibition of Zera Levatala.
 As not all acts of touch are prohibited, as is seen from the fact one is not required to keep Harchakos in public, and we only find a prohibition mentioned regarding a touch of affection, or a touch of extended period of time, such as to check for lice.