I have 2 points from this thread. The first is that if I follow the link to
http://www.rsjoomla.com/index.php/rsformpro.custom_code/Custom-code.html the instruction is:
1. Create a textbox component
2. In the Default Value, type this code:
//<code>
$user = $RSadapter->user();
return $user['email'];
//</code>
At first I could only enter one line of code in the default value field. I discovered users must add the UPDATE... problem solved!
My second point is that my site has just gone live and hit a massive problem which has completely confused me, but which could be related to RSForm Pro or, at least, the crazy character solution below. My form contains the following script (from
here )
global $my;
if($my->id){
$formLayout = str_replace(\"-11-\", $my->name, $formLayout);
$formLayout = str_replace(\"2-2*\", $my->username, $formLayout);
$formLayout = str_replace(\"*3-3-*\", $my->email, $formLayout);
$formLayout = str_replace(\"*4-4-4*\", $my->usertype, $formLayout);
}
Else {
$formLayout = str_replace(\"-11-\", \"NOT REGISTERED\", $formLayout);
$formLayout = str_replace(\"*2-2*\", \"\", $formLayout);
$formLayout = str_replace(\"*3-3-*\", \"NOT REGISTERED\", $formLayout);
$formLayout = str_replace(\"*4-4-4*\", \"\", $formLayout);
}
The default value of the e-mail and username fields are as per the script. Also, the user e-mail is sent to {global:useremail}
Users A, B and C are in different countries and do not know each other.
User A logs in and completes a form. His form result appears to come from him, and he receives a confirmation e-mail.
While User A is still logged in, User B logs in and completes a form. User B's form displays user A's e-mail and username, and the confirmation e-mail is sent to user A.
While User A is still logged in, User C logs in and completes a form. User C's form displays user A's e-mail and username, and the confirmation e-mail is sent to user A.
The site is now offline and I am almost in tears, having already pulled out my hair. If anyone can suggest where this problem might be arising, please help, especially if it is connected with the form or script.
Thanks
Adrian
Post edited by: adrian_m, at: 2008/08/20 16:43<br><br>Post edited by: adrian_m, at: 2008/08/22 09:46