Hello,
I look good on your forum but nothing works. Here I use version 3.1 of ChronoForms. Here is my problem:
I have a joomla site, and a form accessible to people connected. And I want without asking the name of the person, retrieve this information in the email sent me the form. I found a lot of code but I never understand where to put it in ChronoForms. Often noted to put at the beginning of html, so I open my form and that's what I do, but it does not work. Have you a solution, perhaps with a print screen because I speak English and it is not easy even with the translation button to find the answer to my problem. That is the code I found the closest to my problem http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=17112&p=46999&hilit=user+connect # p46999 or search with the words ...
I also found the code of one of your tutorial but nothing works
<?php $user =& JFactory::getUser();
?>
<input type= 'hidden' name='id' value='<?php echo $user->id; ?>' />
or
$user=JUser::getuser() ;
$username= $user->username ;
Thank you very much p
I look good on your forum but nothing works. Here I use version 3.1 of ChronoForms. Here is my problem:
I have a joomla site, and a form accessible to people connected. And I want without asking the name of the person, retrieve this information in the email sent me the form. I found a lot of code but I never understand where to put it in ChronoForms. Often noted to put at the beginning of html, so I open my form and that's what I do, but it does not work. Have you a solution, perhaps with a print screen because I speak English and it is not easy even with the translation button to find the answer to my problem. That is the code I found the closest to my problem http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=17112&p=46999&hilit=user+connect # p46999 or search with the words ...
I also found the code of one of your tutorial but nothing works
<?php $user =& JFactory::getUser();
?>
<input type= 'hidden' name='id' value='<?php echo $user->id; ?>' />
or
$user=JUser::getuser() ;
$username= $user->username ;
Thank you very much p
I also did lots of research GetUser but I find only answers for chronoconnectivity. I recall what I want is to get my form ChronoForms in the name of the person logged instead of the question again. Thank you
Hi stylo,
The code you have here should work OK. When you say it doesn't work what happens exactly?
Try this in the OnSubmit Before Box:
Bob
The code you have here should work OK. When you say it doesn't work what happens exactly?
Try this in the OnSubmit Before Box:
<?php
$user =& JFactory::getUser();
if ( $user->id = 0 ) {
$name = 'guest';
} else {
$name = $user->name;
}
JRequest::setVar('name', $name);
?> Then add {name} in your email template like:Dear {name},Bob
you're the best, I finally saw where to add the 2 codes.
Thank you thank you thank you
Thank you thank you thank you
Hello,
in fact I still have a problem to access this form, individuals must be logged into the extranet joomla, she completed the form and sending. The problem is that when it also wants to go to the forum Kunena also accessible to people connected, well it said, only accessible to registered, please register to access it, while the account is created. So I try to disconnect me, and I can not either. What it may come from. Whereas if I delete the code that you gave me everything works fine?
"Members Only
This forum is open only to registered and connected.
If you are already registered, login first."
Thank you in advance.
in fact I still have a problem to access this form, individuals must be logged into the extranet joomla, she completed the form and sending. The problem is that when it also wants to go to the forum Kunena also accessible to people connected, well it said, only accessible to registered, please register to access it, while the account is created. So I try to disconnect me, and I can not either. What it may come from. Whereas if I delete the code that you gave me everything works fine?
"Members Only
This forum is open only to registered and connected.
If you are already registered, login first."
Thank you in advance.
Hi stylo,
Sorry, I've read your post several times but I still don't understand the problem :-(
Bob
Sorry, I've read your post several times but I still don't understand the problem :-(
Bob
when I put the codes you gave me in the right place, I receive my good name in the mail, but I can not disconnect from my frontend. When I click logout, it does not do anything.
Is this clearer?
Thank you for your help
Is this clearer?
Thank you for your help
Hi stylo,
Thanks, I understand . . . but there is nothing in the code I posted that will affect your ability to logout (or anything else much at all).
Bob
Thanks, I understand . . . but there is nothing in the code I posted that will affect your ability to logout (or anything else much at all).
Bob
ah, yet I'm testing on several sites and it does not work. once
in "On Submit code - before Sending email:
(May contain PHP code with Tags) "as soon as I send a test form I can not log in anymore
Of course I put {name} in the "email template"
<? Php
$ User = & JFactory:: getUser ();
if ($ user-> id = 0) {
$ Name = 'guest';
Else {}
$ Name = $ user-> name;
}
JRequest:: setvar ('name', $ name);
?>in "On Submit code - before Sending email:
(May contain PHP code with Tags) "as soon as I send a test form I can not log in anymore
Of course I put {name} in the "email template"
Hi stylo,
My apologies :-( This line
Bob
My apologies :-( This line
if ( $user->id = 0 ) {should beif ( $user->id == 0 ) {Bob
I have no luck still does not ca
Now even before sending the form I just do not disconnect me
Now even before sending the form I just do not disconnect me
AC does not change despite all the tests as soon as I go once on the page containing the form ChronoForms then sent, without the little I do I log out.
Hi stylo,
Please copy and paste the code you are now using here so that I can see it.
Bob
Please copy and paste the code you are now using here so that I can see it.
Bob
<?php
$user =& JFactory::getUser();
if ( $user->id == 0 ) {
$name = 'guest';
} else {
$name = $user->name;
}
JRequest::setVar('name', $name);
?>and
vient de {name},
Hi stylo,
I don't understand either. That looks OK.
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
I don't understand either. That looks OK.
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
Hi stylo,
Fixed: there was a copy of my code including the error in the Form JavaScript box.
Bob
Fixed: there was a copy of my code including the error in the Form JavaScript box.
Bob
it works great, but you qu'appels the javascript box?
Thank you very much for your help
Thank you very much for your help
This topic is locked and no more replies can be posted.
