Exporting a Wordpress Contact Us Form as XML to an email



I have been searching all over for an answer to this but I am really stumped so I was hoping someone could point me in the right direction.


I have a form for a website I am developing for a client. When the user enters in their information and clicks "submit" I need the data to be sent to an email address in XML format since they are using an external system to handle data entries.


Here is the XML format I was given, so the form needs to be exported in this format.



<APP>CUSTOM
<PREFIX>[prefix]</PREFIX>
<FIRST>[required-first]</FIRST>
<MIDDLE>[middle]</MIDDLE>
<LAST>[required-last]</LAST>
<SUFFIX>[suffix]</SUFFIX>
<ADDR1>[required-address]</ADDR1>
<ADDR2>[address2]</ADDR2>
<CITY>[required-city]</CITY>
<STATE>[required-state]</STATE>
<ZIP>[required-zip5]</ZIP>
<ZIP4>[zip4]</ZIP4>
<EMAIL>[required-valid-email]</EMAIL>
<AFFL>[affl1]</AFFL>
<PHONE>[phone]</PHONE>
<ISSUE>[required-issue]</ISSUE>
<MSG>

PHONE: [phone]
PHONE TYPE: [speech]
(Voice is normal phone, VP is VideoPhone, TTD is Text-Telephone Device)

SUBJECT: [required-subject]

MESSAGE:
[required-message]

**************Additional Information:***********************
X-URL: [$HTTP_REFERER]
User Agent: [$HTTP_USER_AGENT]
X-Remote-Host: [$REMOTE_ADDR]
DATE: [$DATE] [$TIME]
TRANS ID: [$~TRANSID]
</MSG>
</APP>


I am inexperienced in building custom forms in HTML, so any insight on how I might go about this would be much appreciated. The site is currently in Wordpress so alternatively if anyone knows of any plugins that would easily accomplish this that would be great too.


No comments:

Post a Comment