Slightly off topic -
I'm curious is anyone on the list has used HTML_Quickform from PEAR and
could help me out of a hole I'm in?
I'm stuck on how to return the values of a group array so that I can put
the values in an email.
This is how I setup the phone number field on my form:
//add phone number grouping
$phone[] =
&HTML_QuickForm::createElement('text','areacode',null,'size="3"');
$phone[] =
&HTML_QuickForm::createElement('text','exchange',null,'size="3"');
$phone[] =
&HTML_QuickForm::createElement('text','last4',null,'size="4"');
$form->addGroup($phone,'phone_number','Phone: ','-');
$form->addGroupRule('$phone','Enter Phone Number','required');
// pull form data into $data variable
$data = $form->getSubmitValues();
Then if my form is valid I want the phone number printed in my email:
<snip>
if ($form->validate()) {
$msg = "Registration Form \n \n";
$msg .= "Client Name:\t$data[first_name] $data[last_name]\n";
$msg .= "Client Email:\t$data[email]\n";
$msg .= "Client Phone:\$data[phone_number]";
My email looks like this:
Client Name: t Jordan
Client Email: tim@pcs-alaska.com
Client Phone: Array
Any help is very appreciated!
Thanks,
Tim
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Thu Jul 13 12:18:51 2006
This archive was generated by hypermail 2.1.8 : Thu Jul 13 2006 - 12:18:52 AKDT