This topic is locked

How to save and email a readonly value on a edit page (PHPR 6)

1/26/2012 3:54:46 PM
PHPRunner General questions
N
Nelson author

Hi,
How do I save and send the info on a field when it's just a readonly field on the edit page:
the field :

View as (custom): $value="text:"."
".""."
"."text"."
".""."
"."text"."
"."text"."
"."text"."
"."text";
edit as: readonly


the info in the field doesn't get saved after updating and doesn't get sent by e-mail!
How can I transform the readonly info to a actual info which can be saved and sent by email?
Thanks

C
cgphp 1/26/2012

The value of a readonly field is saved properly to the database. Please, provide more info.

N
Nelson author 1/27/2012



The value of a readonly field is saved properly to the database. Please, provide more info.


Hi Cristian,
I created an small project and uploaded it to the demo account to explain myself better:
What I'm trying to do here is...first the user comes and writes his name and then when I update the record...the user gets my greetings by email.
user's add page: http://demo.asprunner.net/metallica777_hotmail_com/testing/table1_add.php
Admin's edit page (to send a signatured email back to the user: http://demo.asprunner.net/metallica777_hotmail_com/testing/table1_edit.php?editid1=1
I have in "Events" function on the "Edit page" , "After record updated" this formula to send an email:

{

global $conn;
//admin email

$email="myemail@hotmail.com";
//message

$subject="Greatings\r\n";
$headers = "From: ".$values["Name"]."\r\n" .

"X-Mailer: php";
$message="\r\n";

$message.="Name: ".$values["Name"]."\r\n";

$message.="Signature: ".$values["Signature"]."\r\n";
mail($email, $subject, $message, $headers);

return true;

}


The problem is the Signature field doesn't get emailed...it comes empty to inbox!

What I'm doing wrong here, please?
Thank you

C
cgphp 1/27/2012

In the "Edit as:" settings, set the "Default" value of the Readonly field as:

"Greeting\r\n\r\nwww.site.com"
N
Nelson author 1/27/2012



In the "Edit as:" settings, set the "Default" value of the Readonly field as:

"Greeting\r\n\r\nwww.site.com"



Still doesn't work...might be a bug in PHPRunner 6.0(Build 9685)..
I thought of a another solution...I will send the field from a table to admin's table by a click on a button and when the admin updates the record...the users will receive the info I want them to receive!
Thank you

C
cgphp 1/27/2012

Update to latest build: 9948

N
Nelson author 1/27/2012



Update to latest build: 9948


I'm using the new version..and still it's not working..I will solve it in a whole new way...thank you for taking the time to answer my questions, Sir!
Have a good weekend

N
Nelson author 1/27/2012

Oh wow...amazing...not even a whole new way worked...very strange that readonly input can only be seen not emailed...
can't even find a proper answer on the net...very strange!