- πΊπΈUnited States aharown07
I don't know how to code a "return to where you were when you clicked /poll/add" route.
What I've done as a workaround may be useful to someone (replacing WHATEVER as needed)
β’ Step one: create new route in poll.routing.yml
poll.poll_WHATEVER: path: '/WHATEVER' defaults: _title: 'WHATEVER'
β’ Step two: change route name in poll/src/Form/PollForm.php to use the new route instead of poll.poll_list
This is currently line 70. Looks like this:$form_state->setRedirect('poll.poll_list');
Of course, this approach requires re-hacking after any update to poll module.
- Status changed to Closed: won't fix
about 2 months ago 6:11pm 4 October 2024