sebastiangreger / kirby3-commentions

A versatile comment system and integrated Webmention endpoint for Kirby 3.
MIT License
58 stars 7 forks source link

Keep the form displayed #96

Closed yoanmalie closed 1 year ago

yoanmalie commented 3 years ago

Hi, Even if the form is submitted, I would like to keep the form displayed on the page. I saw that it's impossible to do it through options or snippet, because it's managed in the core plugin code here https://github.com/sebastiangreger/kirby3-commentions/blob/4b85ed119ab2fc226018f79d76ea0ba0ef3f3133/lib/Frontend.php#L42

Thanks!

sebastiangreger commented 3 years ago

Hi, and thank you for your comment. I agree this could be made configurable - the current setup is essentially one of many small means to make spammer's life a tad harder. But as you point out, that may have UX implications in some contexts and is currently impossible to override (I can't even come up with a creative hack right now, as that if-clause is so strict), so this shall be addressed in the next update!

sebastiangreger commented 3 years ago

This can now be configured possible in the Commentions 2.0 beta 1.

It's as straightforward as calling the form helper with the according attribute in your template: `<?= commentions('form', ['keepvisible' => true]) ?>. The new attribute variable for the commention helpers are documented here: https://github.com/sebastiangreger/kirby3-commentions/tree/develop#frontend-helper