You can do something like this adding the 'script' tag at the bottom of the view.
<script>
$("#field1",).on('change', function(){
var val2 = $("#field2").val(),
val1 = $(this).val();
if(val2!=0)
{
var sum = parseInt(val1) + parseInt(val2);
$(this).val(sum);
}
});
</script>
Hope this helps.
Daniel
Your "problem" doesnt have anything to do with Laravel Nova or the views made by Node, The user interaction is handled by javascript / jQuery.
Sign in to participate in this thread!