This topic is locked
[SOLVED]

 Use phprunner's popup to edit and add record

2/15/2010 7:13:13 PM
PHPRunner General questions
D
Dale author

Ive searched the forum and have not found anything relating to my issue.
When on the list page and selecting Add New button, I would like to pop the _add.php into phprunner's popup window.

What do I need to call to use this feature.
When on a list page and you select inline edit or inline add, if you have a dropdown list with add On the fly, selecting on the fly brings up the record in a nice popup window. Works perfectly.
I would like to use these popup windows when I select Add New or select edit on a record.
Can you give me a sample snippet on how I would call up your phprunner popup.

Ver 5.1
Thankyou.

D
Dale author 2/16/2010

Well I'm halfway there.
In before display list event I assign
$xt->assign("addlink_attrs"," onclick=\"javascript:return DisplayPage(event,'deficiency_add.php','','','','');\"");
So when I click the Add New button on the list page, the deficiency_add page displays in the popup.

All good so far.

When I click Save, I get the php error "Undefined variable: linkfield".

Of course the phprunner popups are used only when adding on the fly for a picklist, so Im sure the returning function is trying to update a picklist, and there is none as I am doing this from the list page.
Is there something I can do, to get rid of the php error and have the popup just show the next Add page in the popup after saving.
Im hoping Im going in the right direction. Any assistance appreciated.

I would like to also have the edit page show in the popup dialog also, but I figure I can get that if I get this Add page working.

D
Dale author 2/17/2010

I know there is lots going on with the new 5.2 release, but any chance of getting a pointer on this issue.

Is there a particular function I should be looking at, any way to fake out the function trying to add the new item to a list.

The record does in fact save correctly, it's just the barking about the undefined variable linkfield.
Thanks as always.