The simplest definition of how to build a German passive I can come up with is
- The accusative object of the sentence in active transforms into the subject of the sentence in passive
- The subject of the active sentence can transform into the new sentence by adding it with "von" + dative or "durch" + accusative
- The predicate of the active sentence is transformed into the passive sentence's predicate.
- Dative and prepositional objects stay as they were
(1) will not work for "helfen", as "helfen" (or other intransitive verbs) do not carry accusative, but rather dative objects, so such a sentence wouldn't have a subject.
You can work around this by adding an impersonate subject to the sentence ("Es") and form a sentence like
Es wird ihm geholfen
and your example is simply an abbreviation of the above - "Es" can be omitted if it is replaced by another sentence component taking position 1 (here the dative object).
What you are seeing there is called unpersönliches Passiv. And your grammar books should mention this as an exception to their "can't form a passive".