This topic is locked

Transfer values into Add Page

3/28/2011 5:31:23 AM
PHPRunner General questions
I
itmann author

Hi Runners,
i have created a table "communications" which enables the employees to send internal messages.

i'd like to create a button on the Email_view page which opens "reply_add.php"page and writes the following values by default:
"From" field in the original messege should be written in "To" field on reply page

"Subject" field in the original message should be written in "Subject" field on reply page
that will save time for the employees to reply a message
please see the screenhot for a better explaination
thanks for your help !!

J
Jane 3/29/2011

Hi,
to create button use custom event on the Visual Editor tab. Here is a sample:

if (@$_REQUEST["MsgID"])

echo "<input type=button class=button value=\"Reply\" onclick=\"window.location.href='replay_add.php?messid=".$_REQUEST["MsgID"]."';\">";


Then check $_REQUEST["messid"] value in the Add page: Before process event, select Fromand Subjectvalues based on this ID and save it in the session variables. Use these session variables as default values on the "Edit as" settings dialog on the Visual Editor tab.

I
itmann author 3/29/2011

thanks jane for your answer, but i'm still stuck,
in the visual editor i added your code as php code snipset, then i did not understand the second part of your answer !! could you be kind and explain it step by step..

and what should i write in the Add page: Before process event??
awaiting your answer ..thanks alot