This topic is locked

Edit Link in addition to "Add New"

10/23/2013 12:10:35 PM
PHPRunner General questions
F
fmbma author

Let's say I have a Customer master table, and a Sales detail table. When adding a new sale, the first field is a dropdown to select the customer. The Link field is CustomerID, the display field is CustomerName. After the user selects the customer, I would like to have a link to edit the customer similar to the Add New that is built in. It would pop up a window that would allow the user to edit Customer information (such as address) prior to adding the Sales record. I tried by adding a code snippet like this:
echo "<a href=tblcustomers_edit.php?editid1=". $data["CustomerID"].">Edit Customer</a>";
either my syntax is wrong, or the CustomerID doesn't get loaded, because the query string is empty.
thanks for any help!

C
cgphp 10/23/2013

You can use javascript to dinamically add the edit link, so you can fetch CustomerID from the selected item. Popup window requires extra custom code, check out this page https://xlinesoft.com/blog/2013/04/25/displaying-a-page-in-a-popup-window/