Guide 95 – Adding fields to forms that are not (real) database fields |
3/20/2025 2:52:15 PM |
PHPRunner Tips and Tricks | |
![]()
In the example, we simulate creating an invoice/delivery note, and selecting the Customer gives us the shipping addresses, which are structured as "Master" -> "Detail," and are displayed in a checklist. Additionally, and this is where the example comes in, we want to be able to add a new address in the same form. Objetive DEMO: https://fhumanes.com/sh/
The "New Address" checkbox and the "memo" address field are not fields in the INVOICE table. If you are interested in this topic, continue reading the full article at this link . |
|
![]() |
fhumanes author 3/20/2025 |
Technical Solution To add fields, in the table's SELECT statement, we add all the "dummy" fields we need and then define the field type (visual controls) we want them to have.
At the JavaScript level, we program the "dummy_address" field to not appear until the "dummy_check" field is selected (yellow and blue blocks).
I hope you like it. I'll leave you the example so you can install it on your PCs. |