This topic is locked

New List Page Button Action on all selected items.

12/22/2008 4:54:38 PM
PHPRunner General questions
D
digger68 author

I am wrapping up my eval of phprunner and have one open item left to make the final purchase decision. I am a casual PHP coder, only when needed.. so guru I am not. I want to add button the list page that does the following:
-for each item selected, update the value of one column in the row of that record.
I think I add the button via the html listing in the Visual editor in HTML mode. Not sure how to grab what was checked to update the field. If you need more info let me know.
Thanks

T
thesofa 12/22/2008

you could use a multiple inline edit, then Save All, no need for custom programming at all

D
digger68 author 12/23/2008

you could use a multiple inline edit, then Save All, no need for custom programming at all


The column in each row that needs updated is not shown to the user. How would that work givin your option? Thats why I was thinking of doing it from list screen. They could choose each of the records and click a button to change the indicator field that is not shown.
~sorry I didn't state that out front..
Thanks

T
thesofa 12/23/2008



The column in each row that needs updated is not shown to the user. How would that work givin your option? Thats why I was thinking of doing it from list screen. They could choose each of the records and click a button to change the indicator field that is not shown.
~sorry I didn't state that out front..
Thanks



quite well, when you click Save All, you have an event that updates the non-shown field as the record is saved.

J
Jane 12/23/2008

Hi,
here are some tips:

  1. proceed to theVisual Editor tab
  2. turn on HTML mode, find this line:
    {BEGIN delete_link}



and add following code just before:

<A onclick="frmAdmin.a.value='update'; frmAdmin.submit(); return false;" href="#">update</A>


3. and add some code to theBeforeDeleteevent:

//delete records

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

return true;
if(@$_POST["a"]=="update")

{

//update record here

return false;

}

D
digger68 author 12/23/2008

Thank you Jane and thesofa for all your help, I am now a customer. Your suggestions worked great.