Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with a variable in a form

    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

    Code:
    $toEmail = $email_arr[$post_data['feedback_to']];
    		
    		try {
    			$msg = app_Mail::createMessage(app_Mail::FAST_MESSAGE)
    					->setRecipientEmail($toEmail)
    					->setSenderEmail((@$profile_fields['email']) ? $profile_fields['email'] : trim( $post_data['member_email'] ))
    					->setSenderName((@$profile_fields['username']) ? $profile_fields['username'] : trim( $post_data['member_email'] ))
    					->setSubject($post_data['subject'])
    					->setContent($post_data['message']);
    					
    			app_Mail::send($msg);
    		} catch (SK_EmailException $e) {
    			if ($e->getCode() == SK_EmailException::WRONG_SENDER_EMAIL_ADDR)
    			{
    				$response->addError($lang_errors->text('false_email'), "member_email");
    				return;
    			}
    		}
    				
    		$_SESSION['feedback_to'] = $post_data['feedback_to'];
    		$response->redirect( SK_Navigation::href('contact') );
    	}
    }
    Last edited by freshfitz; 11-06-2012 at 02:37 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •