Limited Support
Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.
We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!
Merry Christmas and Happy Holidays! 🎄
Oct 04, 2020 1:35 am
Hi there
I see that in the Add Topic form, the ID of the Tags input element keeps changing. So, what JQuery code can make it a required field, please?
I tried this but it did not work.
$.wpf_tags.attr("required", true);
Thanks.
1 Reply
Oct 08, 2020 10:11 am
Hi @mplusplus,
Please try the following JS code:
function wpfcf_make_tags_required(){
jQuery('form[data-textareaid] input[id^=wpf_tags_]').prop('required', true);
}
jQuery(document).ready(wpfcf_make_tags_required);
document.addEventListener('wpforo_topic_portable_form', wpfcf_make_tags_required);
The code should be added in the current active theme JS files.