Hi. I just started using Chrono Engine to create forms and I'm wondering if there is any way to restrict access to the forms to registered (or special) users only?
I'm using Joomla 1.5 RC3.
Thanks in advance.
I'm using Joomla 1.5 RC3.
Thanks in advance.
Hi Kizo,
Use this code at the top of your form html code :
please let me know how it will work.
Use this code at the top of your form html code :
<?php
$user = &JFactory::getUser();
if(!$user){return;}
?>
please let me know how it will work.
it doesn't work for me (using joomla 1.0.13)
should i use different code?
help plz...
thanks
should i use different code?
help plz...
thanks
Yes of course, the code above is for J1.5, for J1.0.13, use this :
Cheers
Max
global $my;
$user = $my->username;
if(!$user){return;}
Cheers
Max
Hi Kizo,
Use this code at the top of your form html code :
<?php
$user = &JFactory::getUser();
if(!$user){return;}
?>
please let me know how it will work.
Thanks!
I will try this immediately!
Edit: I've tried now and I'm afraid it didn't change a thing.
Anyway can still see, fill in and submit the form.
Should I put the entire form within some php-tag?<br><br>Post edited by: kizo, at: 2007/10/25 11:30
Yes of course, the code above is for J1.5, for J1.0.13, use this :
global $my;
$user = $my->username;
if(!$user){return;}
Cheers
Max
cool.. it works now...🙂
one more question,
how to add notification that user need to log in first to see the form, not just only blank screen.
thanks
Suckerhead, make the code like this :
Kizo,
Try this code instead:
this code should be put at the top of the html with the php tags included around this code ONLY!;)
Cheers
Max
global $my;
$user = $my->username;
if(!$user){echo "Please login to see the form";return;}
Kizo,
Try this code instead:
<?php
$user = &JFactory::getUser();
if(!$user->id){return;}
?>
this code should be put at the top of the html with the php tags included around this code ONLY!;)
Cheers
Max
Suckerhead, make the code like this :
global $my;
$user = $my->username;
if(!$user){echo "Please login to see the form";return;}
Kizo,
Try this code instead:
<?php
$user = &JFactory::getUser();
if(!$user->id){return;}
?>
this code should be put at the top of the html with the php tags included around this code ONLY!;)
Cheers
Max
thanks... question? SOLVED...
thanks
Kizo,
Try this code instead:
<?php
$user = &JFactory::getUser();
if(!$user->id){return;}
?>
this code should be put at the top of the html with the php tags included around this code ONLY!;)
Cheers
MaxWorks like a charm! Thank you!
Thanks!!
Hey -- first thanks for the great program and thanks for the forum -- very helpful.
Pasted the code below and get, as expected, a blank page.
Is there a way to show the form to everyone BUT disable it for all but special (author or higher) users?
Thanks,
Scott
PS - your product is so easy a monkey could use it! I am paying my $ right after I finish this post!
Pasted the code below and get, as expected, a blank page.
<?php
global $my;
$user = $my->username;
if(!$user){return;}
?>
Is there a way to show the form to everyone BUT disable it for all but special (author or higher) users?
Thanks,
Scott
PS - your product is so easy a monkey could use it! I am paying my $ right after I finish this post!
Hi Scott,
Let me understand, you wanna the form appear to everybody and be submitted by special users only ?
Let me understand, you wanna the form appear to everybody and be submitted by special users only ?
That is correct.
The form, published and working great, is at http://trueazimuth.biz/coaching-review.html
Its a review form that I use with coaching clients only. I want the world to see it because it demonstrates the level of service a person gets who chooses to do coaching with me. But I only want coaching clients to submit (they register and I increase their privileges to author).
Thanks.
Scott
The form, published and working great, is at http://trueazimuth.biz/coaching-review.html
Its a review form that I use with coaching clients only. I want the world to see it because it demonstrates the level of service a person gets who chooses to do coaching with me. But I only want coaching clients to submit (they register and I increase their privileges to author).
Thanks.
Scott
Another, possibly easier, option might be this...
(1) I put the form code that I pasted into chronoforms onto a static content page. What I get is a page that works for no one.
(2) I put some php code** on the static content page that allows everyone EXCEPT special users to see the content -- and using the echo function in php directs special users to use the chronoform (working) version in the user menu.
(3) I set the chronoform (working) version to show up on the user menu for special users.
**Not sure what this php code would be...
Scott
(1) I put the form code that I pasted into chronoforms onto a static content page. What I get is a page that works for no one.
(2) I put some php code** on the static content page that allows everyone EXCEPT special users to see the content -- and using the echo function in php directs special users to use the chronoform (working) version in the user menu.
(3) I set the chronoform (working) version to show up on the user menu for special users.
**Not sure what this php code would be...
Scott
Hi Scott,
I suggest that you put a little conditional php round the Submit field. Assuming that all registered members can submit then:
Bob
PS Nice form by the way. A little Thomas Leonard influence there?
I suggest that you put a little conditional php round the Submit field. Assuming that all registered members can submit then:
<?php
global $my;
if ( $my->id ) {
?>
<input type="submit" tabindex="15" value="Submit Review"/>
<?php
}
?>
Then unregistered users will see the form but will not be able to submit.
Bob
PS Nice form by the way. A little Thomas Leonard influence there?
Thanks Bob! Works like a charm!
And yes, a big Thomas Leonard influence.
(Very perceptive)
Scott
And yes, a big Thomas Leonard influence.
(Very perceptive)
Scott
Hi Scott,
Just a second thought - you might want to use similar code to flag up to non-registered users that the form is a dummy in a few places. If not sure as eggs is eggs someone will go through ad fill it all in then get upset when it won't send.
Bob
(Graduate School of Coaching)
Just a second thought - you might want to use similar code to flag up to non-registered users that the form is a dummy in a few places. If not sure as eggs is eggs someone will go through ad fill it all in then get upset when it won't send.
Bob
(Graduate School of Coaching)
Hi
How can I restrict access to the form to non-registered users in Joomla 2.5.6?
Thank you,
Claude
How can I restrict access to the form to non-registered users in Joomla 2.5.6?
Thank you,
Claude
Hi Claude,
Yes, the Authenticator action in the Security group will do this.
Bob
Yes, the Authenticator action in the Security group will do this.
Bob
This topic is locked and no more replies can be posted.