This topic is locked

How to set up 'Move to' for option for records

2/3/2010 7:37:31 AM
PHPRunner General questions
T
Tokyoj author

Xlinesoft,

I've spent 2 months comparing 5 code generator products. The other 4 should take notes on how it a superior produce is created. Well done!
In PHPRunner, I created a Job Site which accepts 'Applicants' (First Name, Last Name, Phone, etc...data). The data is stored in an 'Applicants' table/page. I want to allow Admin the option to move applicant records to a new table/page.
For example, there are 3 other tables/pages

'Accepted'

'Rejected'

'Considering'
I want to allow Admin the ability to move 'Applicants' records to one of the other tables/pages.

The 'Move to' drop down menu options need to be dynamically populated with the other tables/pages. In this case 'Accepted', 'Rejected', and 'Considering'.

(I know how to manually populate drop down menus...but need the menu to automatically list whatever tables/pages are created.
I think there are 2 methods...

(preferred) Method 1: Check boxes for each record then in the main menu have 'Move Selected to:[please select]'

Method 2: Inline 'Move to' menu for individual records
Can anyone help with how to do this?

Cheers,

Tokyoj

J
Jane 2/3/2010

Hi,
here is a sample on how to update multiple records on the list page:

http://xlinesoft.com/phprunner/docs/update_multiple_records.htm
Also you can create custom dropdown with values ('Accepted', 'Rejected', and 'Considering') in the custom event (Insert PHP code snippet option on the Visual Editor tab).

Here is a sample:

$str = "";

$str.= "<select name=customoption id=customoption><option value=\"\">Please select</option>";

$str.= "<option value=\"Accepted\">Accepted</option>";

$str.= "<option value=\"Rejected\">Rejected</option>";

$str.= "</select>"


Then process selected value in your custom button:

<INPUT class=button onclick="frmAdmin.a.value=document.getElementById("customoption"); frmAdmin.submit(); return false;" value="Update selected" type=button>



and in the BeforeDeleteevent:

if(@$_POST["a"]=="Accepted")

{

...

}