I donβt quite understand what you should do, can you provide more code? Violin?
Try the following:
$('.checkbox').change(function() { var ShowHide = $(this).is(":checked") ? $('.mceEditorWide').show() : $('.mceEditorWide').hide(); }); $(document).on('submit', $('form'), function(e) { e.preventDefault(); alert($('.mceEditorWide').val()); })
There is a simpler implementation of showing / hiding a text field. And when you submit the form, you can see the value of the notified text field.
Here is a working example:
https://jsfiddle.net/nebulousal/4bnjfLc8/
In addition, you can insert your own code to intercept the form submission and do whatever you want, before the actual data that arrives at the server before it is submitted:
$(document).on('submit', $('form'), function(e) { e.preventDefault();
source share