Support the ongoing development of Laravel.io →
Input Packages
Last updated 2 years ago.
0

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

Last updated 4 years ago.
0

I mean, fix this problem for "Laravel Nova". The views are make by Node.

0

Your "problem" doesnt have anything to do with Laravel Nova or the views made by Node, The user interaction is handled by javascript / jQuery.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.