Topics, categories and users can be watching, tags can watched?
ε±εΉεΏ«η
§ 2019-01-09 δΈε11.04.17.png
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!!!!