Note: I am an absolute begginer!
I have the following script that works fine (it has been adapted from a script that made reference to a Radio Field): -
jQuery(document).ready(function($){
var fieldID = 12156;
var showVal = '19489'
var $nextButton = $(".frm_button_submit");
if (($("input[name^='item_meta[" + fieldID + "]']").val() != showVal) && ($("input[type=hidden][name^='item_meta[" + fieldID + "]']").val() != showVal)) {
$nextButton.css('visibility','visible');
}
$("input[name^='item_meta[" + fieldID + "]']").change(function(){
if ($("input[name^='item_meta[" + fieldID + "]']").val() == showVal){
$nextButton.css('visibility','hidden');
} else {
$nextButton.css('visibility','visible');
}
});
});
What I want to do is disable the Next button by making reference to a field that has variable data. In my naivety I assumed that - var showVal could access the field by inserting the field ID.