I have a CF where the user, once logged on, uploads his CV. I want to send him an email confirmation.
But because he is logged on, I do not have a field for email. Now what i see is there could be 3 possible ways to handle this:
1. Using Jmailer class in the onSubmit code area (I am currently using this approach)
2. Add an email field in CF and autopopulate the email field by changing the form code to look like this:
But here is there any way to hide this field or make it un-editable??
3. Third and the best possible way would be to put this php snippet somehow in the Email setup as a TO or Dynamic-To field. I have tried both options but doesnt help.
Is there any better option? If no, then which one should be my best bet?
But because he is logged on, I do not have a field for email. Now what i see is there could be 3 possible ways to handle this:
1. Using Jmailer class in the onSubmit code area (I am currently using this approach)
2. Add an email field in CF and autopopulate the email field by changing the form code to look like this:
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Your Email</label>
<input class="cf_inputbox required validate-email" maxlength="150" size="30" title="Cmon, Enter an Email Please" id="text_28" name="cf_email" type="text" value="
<?php
//Fetching the Email from Login Info
$user = &JFactory::getUser();
$user_email = $user->email;
echo $user_email;
?>
"/>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Your Email :: Please enter a valid email address</div>
</div>
But here is there any way to hide this field or make it un-editable??
3. Third and the best possible way would be to put this php snippet somehow in the Email setup as a TO or Dynamic-To field. I have tried both options but doesnt help.
Is there any better option? If no, then which one should be my best bet?