There is a form for adding equipment, it has a text field where you can enter text, and it will be transferred to the database, and next you have to put a checkbox, so that you can either enter a value in the field or transmit a “fixed” value by clicking on the checkbox.
* Example (consider entering the IP address of the device): *
- In the field you can enter the IP address (if any)
- or click on the checkbox (if the device does not have an IP), when you click on CheckPoint, the phrase "Not available" is sent to the database
And most importantly, if we enter text into a field, one value is passed, and if we set a checkbox, another value is passed, but in ONE column
Question: how to do?