I've been attempting to use jQuery to hide a specific div class field, but unfortunately, I haven't had any success. This particular field is within a support form and should be hidden initially, only appearing when a certain value is selected. I've tried two different methods, both of which have not worked. Below you'll find the HTML code, an image of the HTML, and the jQuery code that I've implemented.
HTML:
<div class="form-field string optional request_custom_fields_21158635">
<label for="request_custom_fields_21158635">iOS Plugin Details</label>
<input id="request_custom_fields_21158635" type="text" name="request[custom_fields][21158635]">
<p>Please provide the iOS Plugin version details for your request. Example: iOS GA5.0.38</p>
</div>
JQuery Code: Method One only hides the field, leaving the label visible.
var iosPluginId = "21158635";
$(document).ready(function() {
if(cust_tags == "kony_internal") {
$('#request_custom_fields_'+iosPluginId).hide();
}
});
JQuery Code: Method Two hides both the label and field.
$(".form-field string optional request_custom_fields_21158635").hide();