/** * XG_Message_AdminNewProfile is for administrative
* messages of new users with additional profile questions
*/
class XG_Message_AdminNewProfile extends XG_Message {
public function __construct() {
$args = func_get_args();
call_user_func_array(array('parent','__construct'), $args);
}
public function send($to, $from) {
// Send a copy to the site owner
parent::send($to, $from);
}
}
protected $_template = 'my_great_template';
<?php // customized profile form with extra fields for signing up to mailing list ?>
<?php if ($this->inJoinFlow) { ?>
<h3>Extra Contact Information</h3>
<p>Fill out the information below if you want to subscribe to my free internet newsletter.</p>
<fieldset class="nolegend">
<p><label for="extra_name">Name:</label><br/>
<input type="text" id="extra_name" style="width: 99%;"
class="textfield" value="" name="extra_name"/></p>
</fieldset>
<fieldset class="nolegend">
<p><label for="extra_address1">Address 1:</label><br/>
<input type="text" id="extra_address1" style="width: 99%;"
class="textfield" value="" name="extra_address1"/></p>
</fieldset>
<fieldset class="nolegend">
<p><label for="extra_address2">Address 2:</label><br/>
<input type="text" id="extra_address2" style="width: 99%;"
class="textfield" value="" name="extra_address2"/></p>
</fieldset>
<fieldset class="nolegend">
<p><label for="extra_city">City:</label><br/>
<input type="text" id="extra_city" style="width: 50%;"
class="textfield" value="" name="extra_city"/></p>
</fieldset>
<fieldset class="nolegend">
<p><label for="extra_state">State:</label><br/>
<input type="text" id="extra_state" style="width: 30%;"
class="textfield" value="" name="extra_state"/></p>
</fieldset>
<fieldset class="nolegend">
<p><label for="extra_zip">Zip:</label><br/>
<input type="text" id="extra_zip" style="width: 30%;"
class="textfield" value="" name="extra_zip"/></p>
</fieldset>
<fieldset class="nolegend">
<p><label for="extra_email">Email:</label><br/>
<input type="text" id="extra_email" style="width: 99%;"
class="textfield" value="" name="extra_email"/></p>
</fieldset>
<fieldset class="nolegend">
<p><label for="extra_phone">Phone:</label><br/>
<input type="text" id="extra_phone" style="width: 70%;"
class="textfield" value="" name="extra_phone"/></p>
</fieldset>
<?php } ?>
$opts = array();
$opts['body'] = "Contact Details: " . $_POST['extra_name'] . "\\r\\n" . $_POST['extra_address1'] . "\\r\\n" .
$_POST['extra_address2'] . "\\r\\n" . $_POST['extra_city'] . "\\r\\n" . $_POST['extra_zip'] .
"\\r\\n" . $_POST['extra_email'] . "\\r\\n" . $_POST['extra_phone'];
$opts['subject'] = "New Contact Details";
$from = $this->_user->screenName;
$to = XN_Application::load()->ownerName;
$msg = XG_Message_AdminNewProfile::create($opts);
$msg->send($to, $from);
Views: 44
Tags:
© 2024 Created by Ning Developer Admin. Powered by
You need to be a member of Ning Developer Docs to add comments!
Join Ning Developer Docs