Forums

The INFO of the my user do not appear in my email

DimApo 20 Aug, 2014
I read the topic http://www.chronoengine.com/forums/posts/f5/t9286.html and I tried to do a reply but the topic is locked. My problem is the following.

I used the code below in a custom field and got the username info of the user correctly, but I can not recieve it at my email account.
<?php 
if ( isset($form->data['username']) && $form->data['username'] ) {
  $username = $form->data['username'];
} else {
  $user =& JFactory::getUser();
  $username = $user->username;
}
?>
<input type='text' name='username' id='username' value='<?php echo $user->username; ?>' />

................................................................
Also I used the same code to get the email info of my user, with the difference that I change the word "username" with the word "email" and I had the same results.

Can anybody help me please?

Thank you
GreyHead 21 Aug, 2014
Hi DimApo,

That code should work OK - but it depends on what settings you have made in the Email action. Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.

Note: if you are using the Easy Wizard you can turn on Debug on the Others tab in CFv4 or the Setup tab in CFv5.

Please also see this FAQ

Bob
DimApo 21 Aug, 2014
Thank you Bob,

I forgot to tell that I work with CFv5.
Firsrt I will do some test of the actions of FAQ that you suggest for the topic, and then I will do the actions that you wrote me above.

In any case, I will send a report for the results.

Best Regards
DimApo 26 Aug, 2014
Hi Bob, and really thank you for your inetrest.

I used the above instructions, I made a new form and I took successful results.

The problem for me is, that I must lock or hide some fields and especially the username field, in order the user to can not change it. Also I want to take these user information (I mean "lock" or "hide") to my mailbox.
I tried enough to do it, but all of my attempts was unsuccessful.

Can you help me, please?
DimApo 26 Aug, 2014
Hi again Bob,

I did again and again more carefully the procedures (http://www.chronoengine.com/forums/posts/f5/t9286.html) and now I can receive the information from the users.
I have two more steps to complete my form.

1) I need the user to receive automatically an email from me (the problem is that I can't configure the settings with this way...e.g.the "Dynamic To" wrote "email" at the field... now what I must write?)
2) I want the users to upload a photo, but I need to receive this like an attachment file on my mail, not at folder of my server path. Ιs possible this function?

Thanks anyway!!!
GreyHead 26 Aug, 2014
Hi DimApo,

If you want to 'lock' inputs you need to make them readonly.

There's a FAQ for CFv4 on attaching uploaded files to emails I believe; and another on sending Email to the user.

Bob
This topic is locked and no more replies can be posted.