This topic is locked

Change Back to List redirect

1/7/2009 10:10:15 AM
PHPRunner General questions
vin7102 author

Hello,
In the "add record" page of a list, I would like to change the "Back to list" button to redirect the user to a different page called "payroll_list.php" instead of going to the current list page.

Where do I have to add the code?
Thanks,

C
cemrunner 1/7/2009

Hi,

I hope I understand you correct...

Just change the link in the visual editor "Back to list" from current to your desired link in the html view.

Cheers

vin7102 author 1/8/2009

Hi cemrunner,
I went to the add record page and opened the html mode for that page but cant find the redirect link at all.

All I am seeing in regards to the back to list button is the following:
{BEGIN back_button}<SPAN class=buttonborder><INPUT class=button type=button value="Back to list" {$backbutton_attrs}></SPAN>{END back_button}
Im really just learning the code editing in php and html so excuse my lack of knowledge.

Thanks

J
Jane 1/8/2009

Hi,
to change "Back to list" link use Add page: Before display event on the Events tab.

Here is a sample code:

$xt->assign("backbutton_attrs","onclick=\"window.location.href='TableName_list.php?a=return'\"");

vin7102 author 1/8/2009

Hi Jane,
Perfect Thank You.
Can you tell me why there is a "cancel' button showing on the add page in visual editor but when the application runs, the cancel button is gone!

how can I get that button to to be available when running the application?
As Always... Thank you for your help Jane

J
Jane 1/8/2009

Hi,
Cancel button is used for Add on the fly option only. This button close popup window with add page.

vin7102 author 1/8/2009

Jane,
Ok that explains it.. Thanks
Now that you've given me the option to rename these buttons and use them as redirects, that solves all kinds of problems with my app.

Is it pretty difficult to add a new button to a page just to use as a redirect link?

That would be absolutely perfect. I've searched the forum and have not found anything related to this issue.
Thanks Again.

J
Jane 1/9/2009

Hi,
you can add new button in HTML mode on the Visual Editor tab manually.

Here is just a sample:

<input type=button class=button value="Button1" onclick="window.location.href='tablename_list.php';">