• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: remembering and filling fields after logging in

remembering and filling fields after logging in 16 years 10 months ago #3599

  • craiz
  • craiz's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi
I' ve read that it is possible to pre-fill fields like user s email, name etc. with data of user logged to Joomla
But my question concerns other issue - once a user is logged and fills out whole form I want all filled fields to be remembered and filled out automatically the next time this user logs into Jommla.
The Form I have should be used often by the same user, if all fields in the form are remembered the user will not have to retype all data over and over again.
Thanks,
Darek
The administrator has disabled public write access.

Re:remembering and filling fields after logging in 16 years 10 months ago #3606

  • dragonjc
  • dragonjc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
I was working on, this Week End, i say you what i have found. I work on from some days ago and have a solution. But need to be work more, to finish.
Component RS SHow Form in build
The administrator has disabled public write access.

Re:remembering and filling fields after logging i 16 years 10 months ago #3608

  • dragonjc
  • dragonjc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
Just one more question to know if it is like me. The area are pre filled with the first registration. Is it that ?
Component RS SHow Form in build
The administrator has disabled public write access.

Re:remembering and filling fields after logging in 16 years 10 months ago #3614

  • craiz
  • craiz's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi
the way we see it is that
1. user logs in
2. fills out the form and sends it
3. lets say that after a week he logs in again then he should see the form already filled out same way as he did a week ago
so he doesn't have to fill it again only change some fields if necessary
The administrator has disabled public write access.

Re:remembering and filling fields after logging i 16 years 10 months ago #3616

  • adrian_m
  • adrian_m's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
Dragonjc - sorry for not replying to your other message. I am so busy and I found a way around. But to give back something to the forum I contributed my latest invention, to get form data into Excel exactly, and with any character font - no CSV effort required at all!
The administrator has disabled public write access.

Re:remembering and filling fields after logging i 16 years 10 months ago #3617

  • dragonjc
  • dragonjc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
craiz wrote:
Hi
the way we see it is that
1. user logs in
2. fills out the form and sends it
3. lets say that after a week he logs in again then he should see the form already filled out same way as he did a week ago
so he doesn't have to fill it again only change some fields if necessary

Ok it's what i understand and the solution is easy, i will write the answer here. Just wait. 1 day ^^. More 1 question, and important. Is it RS!Forms Pro ? because i can give you the answer only for them ... I Try for RS!forms Lite but i'have no work on them a long time ago my upgrade.

Post edited by: dragonjc, at: 2008/07/06 02:15

adrian wrote:
Dragonjc - sorry for not replying to your other message. I am so busy and I found a way around. But to give back something to the forum I contributed my latest invention, to get form data into Excel exactly, and with any character font - no CSV effort required at all!

Sorry i donb't see what you wan't explain.<br><br>Post edited by: dragonjc, at: 2008/07/06 02:17
Component RS SHow Form in build
The administrator has disabled public write access.

Re:remembering and filling fields after logging i 16 years 9 months ago #3697

This worked to prefill the email field of the logged user by inserting the script in the default value:
//<code>
$user = $RSadapter->user();
return $user;
//</code>

Test to prefill a value of a logged user who come backs to update his form

Then I tried to prefill one value (company name) entered by a user who come backs to login in my database table, but this script gives an error message

This is script on form display:

$user = $RSadapter->user();
if($user->email){

$sql=\"select * from jos_my_table where my_table_email={$user->email}\";
$res=mysql_query($sql);
$formLayout = str_replace(\"*-*-*\",mysql_result($res,0,\"company_name\"), $formLayout);
}
Else {
$formLayout = str_replace(\"*-*-*\", \"Insert your company name\", $formLayout);
}
The administrator has disabled public write access.

Re:remembering and filling fields after logging in 16 years 9 months ago #3776

Here is the solution, thanks to Alex support, I have tested it with different types of fields and it works perfectly :woohoo:
//&lt;code&gt;
 
$user = $RSadapter-&gt;user();
 
if($user['username'])
{
$sql=\&quot;select your-table-fields from jos_yourdatabase where your-table-username='$user[username]'\&quot;;
$res=mysql_query($sql);
$r=mysql_fetch_assoc($res);
return $r['your-table-field'];
}
 
else
{
return 'Please insert a valid value';
}
 
//&lt;/code&gt;
<br><br>Post edited by: alexenergy, at: 2008/07/24 21:10
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!