Hello,
I have a form that auto-populates an email address from the database when a user is logged on.
I am using this code:
When I add {email} to the Dynamic from email, it is not recognizing the field. So it's sending the email from ROOT @localhost, and not the user's email.
When I place {email} in the email body, it loads fine.
How do I get that custom data into the Dynamic from email field?
EDIT: I am noticing that no Dynamic fields are loading. I have a field for subject, and this is a field that the user types in information. I tried adding "Supporting Member: {subject}" to the Dynamic subject. That it is not loading either, but again it shows up in the email body.
I also have a display message, and the {email} and {subject} display on it fine.
Thanks,
Melvins
I have a form that auto-populates an email address from the database when a user is logged on.
I am using this code:
<div class="gcore-subinput-container" id="fitem">
<label for="custom" class="control-label gcore-label-top">Email</label>
<div class="gcore-input pull-left gcore-sub-input gcore-display-table" id="fin-custom">
<?php
$user =& JFactory::getUser();
$email = '';
$readonly = '';
if ( $user->id > 0 ) {
$email = $user->email;
$readonly = "readonly='readonly'";
}
?>
<div class="ccms_form_element cfdiv_text" id="email_container_div" style="">
<input id="email" placeholder="" class="validate['required','email'] form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" value=" <?php echo $email; ?> " name="email" type="text" <?php echo $readonly; ?> />
<div class="clear"></div>
<div id="error-message-email"></div>
</div>
</div>
</div>
When I add {email} to the Dynamic from email, it is not recognizing the field. So it's sending the email from ROOT @localhost, and not the user's email.
When I place {email} in the email body, it loads fine.
How do I get that custom data into the Dynamic from email field?
EDIT: I am noticing that no Dynamic fields are loading. I have a field for subject, and this is a field that the user types in information. I tried adding "Supporting Member: {subject}" to the Dynamic subject. That it is not loading either, but again it shows up in the email body.
I also have a display message, and the {email} and {subject} display on it fine.
Thanks,
Melvins