View Full Version : Need help with a variable in a form

11-06-2012, 02:32 PM
I need to add a variable to a pre made form this site uses smarty theme templates. I added an extra field member_id how do I get $post_data['member_id'] to show up in the body of the email?
I would think I would want ->setContent($post_data['message']['member_id']); but that does not work
I can change ->setContent($post_data['message']; to ->setContent($post_data['member_id']; and it will post the member_id

$toEmail = $email_arr[$post_data['feedback_to']];

try {
$msg = app_Mail::createMessage(app_Mail::FAST_MESSAGE)
->setSenderEmail((@$profile_fields['email']) ? $profile_fields['email'] : trim( $post_data['member_email'] ))
->setSenderName((@$profile_fields['username']) ? $profile_fields['username'] : trim( $post_data['member_email'] ))

} catch (SK_EmailException $e) {
if ($e->getCode() == SK_EmailException::WRONG_SENDER_EMAIL_ADDR)
$response->addError($lang_errors->text('false_email'), "member_email");

$_SESSION['feedback_to'] = $post_data['feedback_to'];
$response->redirect( SK_Navigation::href('contact') );