I agree, that doesn't sound right.
Solved How to cancel topic submit?
-
Hi!
Continue of the topic: https://community.nodebb.org/topic/15842
I want to cancel topic submit, if a certain condition is not met.
How can this be done?
thanks!! -
$(window).on('action:composer.check', function (ev, payload) { if (span1.innerText === 'a') { payload.error = 'you cant post right now' } });
-
-
Use
'action:composer.check'
and set payload.error. -
@baris said in How to cancel topic submit?:
and set payload.error.
How to set payload.error? Thank you!
this not work:$(window).on('action:composer.check', function (payload) { if (span1.innerText === 'a') { payload.error('test') } });
-
$(window).on('action:composer.check', function (ev, payload) { if (span1.innerText === 'a') { payload.error = 'you cant post right now' } });
-
@baris Thank you!!!!
Suggested Topics
-
Unsolved Adding fields to topics/posts
General Discussion • • logii
Copyright © 2022 NodeBB | Contributors