Hi there,
I've been trying to get this done for a couple of hours now, but for the life of me I can't figure out how.
I have 2 fields on a form that the user would complete e.g. Leads, Sales. These are saved to the database, and when the record is requested again, I set up a display field that calculates the difference between the 2 e.g. Leads - Sales = Deficit.
What I would like to do, is be able to create the Deficit field on the form, so that once the user has filled in the Leads and Sales fields, the Deficit field will automatically be filled with the difference between the 2.
Thank you for any assistance.
Vinaduro
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Update display field on form
-
- Site Admin
- Posts: 2784
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 3 times
Re: Update display field on form
vinaduro,
You could create some JavaScript to do this..
and put an onchange event on both fielda and fieldb that runs test()
Steven
You could create some JavaScript to do this..
Code: Select all
function test(){
var a = $('#fielda').val();
var b = $('#fieldb').val();
$('#fieldc').val(a - b);
}
Steven