Hi,
I am new with chronoform. I created an form and i want it to show only to registered users. I added an custom code at the on load event with this code
<?php
$user =& JFactory::getUser();
if ( !$user->gid ) {
$mainframe =& JFactory::getApplication();
$mainframe->redirect('index.php', 'U dient ingelogd te zijn om dit formulier in te vullen', 'error');
}
?>
At the authenticator i selected registered users at allowed and public on NO.
The problem is nobody can see the form.
I am new with chronoform. I created an form and i want it to show only to registered users. I added an custom code at the on load event with this code
<?php
$user =& JFactory::getUser();
if ( !$user->gid ) {
$mainframe =& JFactory::getApplication();
$mainframe->redirect('index.php', 'U dient ingelogd te zijn om dit formulier in te vullen', 'error');
}
?>
At the authenticator i selected registered users at allowed and public on NO.
The problem is nobody can see the form.
Hi noah2003,
You only need the Authenticator action so please remove your custom code. (If you are using Joomla! 2.5 then $user->gid no longer works.)
Bob
You only need the Authenticator action so please remove your custom code. (If you are using Joomla! 2.5 then $user->gid no longer works.)
Bob
Hi noah2003,
You only need the Authenticator action so please remove your custom code. (If you are using Joomla! 2.5 then $user->gid no longer works.)
Bob
Hi Bob,
Thank for the reply. Ik have removed the code but with the authenticator action everbody can see it. Whether or im logged in or not. Ik have selected only registered as you can see in the attachement.
Hi noah2003,
You need something in the on Fail event of the Authenticator action. I'd probably use a Redirect User action with 'index.php' in the Target URL; followed by a Show Stopper action to prevent ChronoForms doing anything else.
I think you should also move the Authenticator action up before the Show HTML action.
Bob
You need something in the on Fail event of the Authenticator action. I'd probably use a Redirect User action with 'index.php' in the Target URL; followed by a Show Stopper action to prevent ChronoForms doing anything else.
I think you should also move the Authenticator action up before the Show HTML action.
Bob
Now it keeps redirecting to the homepage. No form vissible. This is what i have at te events.
Hi noah2003,
Have you logged in at the front-end?
Bob
Yes i have. This is an print screen from the event page.
Problem is solved. As i saw in another post with an reply from you. I had to drag the redirect user into the denied part. I did not know it was possible. Thanks for your help.
Problem is solved. As i saw in another post with an reply from you. I had to drag the redirect user into the denied part. I did not know it was possible. Thanks for your help.
Not solved yet. After filling in the form and wanting to submitting it. Nothing happens now. See attachement.
Hi noah2003,
But you haven't dragged it into the pink 'Denied' box (sorry I forgot it was called 'Denied' and not 'On Fail').
Bob
But you haven't dragged it into the pink 'Denied' box (sorry I forgot it was called 'Denied' and not 'On Fail').
Bob
Sorry i added the wron printscreen. The redirect user is in the right box and that works. But the problem now is i can not submit the form.
This topic is locked and no more replies can be posted.