Kirklees Police said the 43-year-old man was assaulted as he walked along Cliffe Lane just before 3.30pm on Monday.
Police said a number of members of the public helped the victim.
Officers want like to trace a witness who was driving a red van at the time and may have vital information.
PC Rachel Jenkinson of Dewsbury Police, said; “Whilst a number of witnesses who came to the victims assistance have already come forward I am keen to trace a man seen in a red van close to the scene who may have vital information about what happened.
“I would appeal to anyone who has any information, and specifically the driver of the red van mentioned to come forward. Enquiries are ongoing.”
Information can be passed to PC Rachel Jenkinson at Kirklees District Police via 101 quoting 13160296672.
Information can also be passed to Crimestoppers on 0800 555 111.
– A 31-year-old man has been arrested in connection with the incident and released on police bail.