Require Registration

Gatsu000 22 Mar, 2008
I don't want people to be able to access one of my forms unless they are registered with the site(joomla!) is this possible with Chronoforms?
jxl 22 Mar, 2008
Sure, like any other Joomla link, you can just make the link to the form restricted to registered.
GreyHead 23 Mar, 2008
Hi Gatsu000,

You can also restrict the form content. In Joomla 1.0.x you can use code like:
<?php
global $my;
If ( $my->id ) {
  // user is registered show some code
} else {
  // user isn't registered - show some other code
}
?>
I'm sure that there is something similar for Joomla 1.5

Bob
torekasi 25 Mar, 2008
Hi,

i'm not good in programming.

is it posible that you can give the example.
i hope that when registered user is try to input data in our form, the table can captures username and save in to the same form database.

sorry, i am new joomla user..:lol:
GreyHead 25 Mar, 2008
Hi torekasi,

Which version of Joomla are you using?

Bob
torekasi 14 Apr, 2008
Hi Bob,

I'm using the 1.0.x joomla version,
my concern is every time user input the information in the form, it wll automaticly save the user name and store it into the database, at lease we will know who is the user have key in the information and we are able to reply them back..

i'm not a programing user,
appriciate if you can give some example for me

thanks
GreyHead 14 Apr, 2008
Hi torekasi,

To get user information you can use the $my object (in Joomla 1.0.x). Add this to your form code
<?php
global $my;
?>
<input type='hidden' name='username' value='<?php echo $my->username; ?>' /> 
<input type='hidden' name='userid' value='<?php echo $my->userid; ?>' />
This should add field with the username & userid to your results. (UserId is more useful to use for the computer, UserName is more useful for human beings.)

Bob<br><br>Post edited by: GreyHead, at: 2008/04/14 10:03
This topic is locked and no more replies can be posted.