Hi,
Is it possible to add a download as vCard function to a contact form with Chronoforms?
I have started to make usual contact pages using chrono forms instead of the default joomla contacts or other third hand extensions.
Best regards,
Micke
Is it possible to add a download as vCard function to a contact form with Chronoforms?
I have started to make usual contact pages using chrono forms instead of the default joomla contacts or other third hand extensions.
Best regards,
Micke
Hi Micke,
The Joomla! 2.5 Contact component uses this code to create a VCard. I think that you can probably adapt it to work with ChronoForms:
Bob
The Joomla! 2.5 Contact component uses this code to create a VCard. I think that you can probably adapt it to work with ChronoForms:
JResponse::setHeader('Content-disposition', 'attachment; filename="'.$card_name.'.vcf"', true);
$vcard = array();
$vcard[].= 'BEGIN:VCARD';
$vcard[].= 'VERSION:3.0';
$vcard[] = 'N:'.$lastname.';'.$firstname.';'.$middlename;
$vcard[] = 'FN:'. $item->name;
$vcard[] = 'TITLE:'.$item->con_position;
$vcard[] = 'TEL;TYPE=WORK,VOICE:'.$item->telephone;
$vcard[] = 'TEL;TYPE=WORK,FAX:'.$item->fax;
$vcard[] = 'TEL;TYPE=WORK,MOBILE:'.$item->mobile;
$vcard[] = 'ADR;TYPE=WORK:;;'.$item->address.';'.$item->suburb.';'.$item->state.';'.$item->postcode.';'.$item->country;
$vcard[] = 'LABEL;TYPE=WORK:'.$item->address."\n".$item->suburb."\n".$item->state."\n".$item->postcode."\n".$item->country;
$vcard[] = 'EMAIL;TYPE=PREF,INTERNET:'.$item->email_to;
$vcard[] = 'URL:'.$item->webpage;
$vcard[] = 'REV:'.$rev.'Z';
$vcard[] = 'END:VCARD';
echo implode("\n", $vcard);
Bob
This topic is locked and no more replies can be posted.