The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
putting default value for comments not replies
Summarize Topic
✦
✦
✦
AI is analyzing the discussion...
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Jun 04, 2021 3:02 am
(@roah)
Active Member
Joined: 5 years ago
Hello I want to put a default value to comments, just for comments not replies
and not placeholder
it's a value
can you help me please?
Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Jun 04, 2021 1:23 pm
(@asti)
Illustrious Member
Joined: 8 years ago
Hi @roah ,
I'm really sorry, but there isn't an easy solution we can provide you. You should write custom JS codes for this kind of customization.
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Jun 04, 2021 5:14 pm
(@roah)
Active Member
Joined: 5 years ago
can help me to make attachments as "required" just in my comments ???
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jun 04, 2021 5:51 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@roah ,
Use this JS code:
jQuery(document).ready(function ($) { $(document).on('click', '.wc_comm_submit', function (e) { if (!($(this).parents('.wpd_comm_form').find('.wmu-attachments-ids') && $(this).parents('.wpd_comm_form').find('.wmu-attachments-ids').val())) { wpdiscuzAjaxObj.setCommentMessage('Attachment is required'); e.preventDefault(); e.stopImmediatePropagation(); return false; } }); });
Just make sure this JS code is being loaded before the wpDiscuz js files.
(@roah)
Joined: 5 years ago
Active Member
Posts: 8
Jun 09, 2021 11:38 am
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti
please can you update this code to make required attachments just for comments not replies? I tried to put (.wpd-main-form-wrapper) as a parent class but that didn't work
thank you very much
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jun 09, 2021 2:12 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@roah ,
Try this one:
jQuery(document).ready(function ($) {
$(document).on('click', '.wc_comm_submit', function (e) {
if (!($(this).parents('.wpd_main_comm_form').find('.wmu-attachments-ids') && $(this).parents('.wpd_main_comm_form').find('.wmu-attachments-ids').val())) {
wpdiscuzAjaxObj.setCommentMessage('Attachment is required');
e.preventDefault();
e.stopImmediatePropagation();
return false;
}
});
});
(@roah)
Joined: 5 years ago
Active Member
Posts: 8
Jun 09, 2021 3:44 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti
It doesn't work still require the attachments
Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Jun 09, 2021 3:50 pm
(@asti)
Illustrious Member
Joined: 8 years ago
Just make sure this JS code is being loaded before the wpDiscuz js files.
What about this condition? Are you sure this is made?
(@roah)
Joined: 5 years ago
Active Member
Posts: 8
Jun 09, 2021 11:38 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti
how exactly can I do that ?
I put this code in child theme and in Header and Footer manager Code plugin and Still doesn't work
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jun 11, 2021 1:02 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@roah ,
You can create some new JS file, put the code in the file, then add the created file in the header of your active theme. If it still doesn't work, keep the changes and leave some example URL to allow us to check the issue.
Super Globals
Options and Features