sponseSection.hide() } } const hideOrShowReasonInput = (value, labelText) => { let shouldShow = value > 3; label.html(labelText + reason + ' *') input.prop('required', shouldShow); $("input[name=_com_digitallab_gastat_GastatFeedbackPagesPortlet_INSTANCE_juvm_feedbackReason]").val('') shouldShow ? unsatisfiedInputGroup.show() : unsatisfiedInputGroup.hide(); } })