Simulations are presented of the photoionisation of three dense gas clouds threaded by magnetic fields, showing the dynamical effects of different initial magnetic field orientations and strengths. For moderate magnetic field strengths the initial radiation-driven implosion phase is not strongly affected by the field geometry, and the photoevaporation flows are also similar. Over longer timescales, the simulation with an initial field parallel to the radiation propagation direction (parallel field) remains basically axisymmetric, whereas in the simulation with a perpendicular initial field the pillar of neutral gas fragments in a direction aligned with the magnetic field. For stronger initial magnetic fields, the dynamics in all gas phases are affected at all evolutionary times. In a simulation with a strong initially perpendicular field, photoevaporated gas forms filaments of dense ionised gas as it flows away from the ionisation front along field lines. These filaments are potentially a useful diagnostic of magnetic field strengths in H II regions because they are very bright in recombination line emission. In the strong parallel field simulation the ionised gas is constrained to flow back towards the radiation source, shielding the dense clouds and weakening the ionisation front, eventually transforming it to a recombination front.