Hi, PHPRunner 5.3 Build 7474
I have a online registration form database that has many fields that, if selected, update a TotalCost field. I created the code on the javascript onload event, this works successfully. What I need is to disable the TotalCost field so it won't be edited by the user.
I have used the javascript var TotalCost = Runner.getControl(pageid, 'TotalCost'); TotalCost.setDisabled(); statement to do this, and it works.
The problem I have is:
If I save the record, the TotalCost field isn't written to the database, and I tested if I remove the above statement, the TotalCost field is saved successfully.
How can I enable the TotalCost field just before writing to the database, and then disable it again?
A more detailed description of the database:
I have about 20 fields that update the TotalCost field, example: Do you require transport to the airport at the cost of 450.00? if checked, update the TotalCost field with 450.00, if unchecked, update the field with -450.00
TotalCost should not be edited by the user, but should be written to the database.
I have tried making the TotalCost a readonly field, but then my javascript doesn't work on the field (it doesn't update TotalCost)
Any suggestions?