I've learned how to make fields "disabled" by using the example in the Tip 6503-how-to-disableenable.... .
Now I would like to know if more advanced functionality exists that would allow for fields in an Edit form to be essentially "locked", based upon another field, so that whatever has been recorded in that field can no longer be changed.
For example, there is a master table for Orders:
Field1: Orders.OrderID [Number]
Field2: Orders.CustomerID [Number]
Field3: Orders.OrderDate [Date]
Field4: Orders.OrderDescription [Text]
Field5: Orders.OrderApproved [Dropdown List]
Field6: Orders.OrderShipped [Checkbox]
Field7: Orders.ShipDate [Date]
Field8: Orders.OrderComplete [Checkbox]
Once the Order has been created, it needs to be approved. Once approval is complete ("Yes" selected), the OrderDate and OrderDescription fields need to be locked so that they can no longer be modified. Later, when the OrderShipped checkbox is checked, the OrderApproved dropdown needs to be locked. Finally, when everything is complete, the OrderComplete checkbox gets ticked and all fields are locked.
I tried doing this with the "disable" javascript code but it resulted in those fields being erased when the record got saved since disabled fields do not get captured by Submit. I searched your forums and found reference to "readOnly" instead of "disable" and found that it worked on "Text" fields but not on checkboxes or dropdown lists. It halfway worked on dates because I was unable to type in the date field but the pop-up calendar would still change the date.
I'm hoping this in not an overly complicated thing to code. It would really be nice if ASPRunnerPro had some option built in where as you could select to disable and lock fields conditionally without having to manually code it.
Thanks again,
Cody <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=13525&image=1&table=forumtopics' class='bbc_emoticon' alt=':rolleyes:' />