Need to set up a form to go into a lead management provider with XML 1.0 ADF
Have the specs on PDF, and have managed to get this done for other clients by modifying my "form outPut" fields in my actual formmailer scripts. Is there an easier way to do this? I am sure there must be?
Toss me a clue please...
PS: Using a cgi perl script for forms, my head isn't wrapped around php yet, been too busy taking care of biz to sit down and actually learn the php stuff...... Need to get this done asap. Of course I can write "cheaters code" into my perl cgi, but it is time consuming... looking for a better option in the long term... thx in advance for any help.
XML 1.0 ADF
Ideas & Help Appreciated
Page 1 of 1
XML 1.0 ADF Ideas & Help Appreciated
#2
Posted 10 August 2007 - 02:36 AM
Can you explain the data cycle a bit more?
User fills out a form and submits it > (mystery steps???) > lead provider receives XML data and stores it
User fills out a form and submits it > (mystery steps???) > lead provider receives XML data and stores it
#3
Posted 10 August 2007 - 11:20 AM
User Fills in Form and Submits it
Form is processed by a CGI Scprit which has been modified to send the output in XML Format like this:
$msgtext="";
$msgtext .= "<?xml version=\"1.0\"?>\n";
$msgtext .= "<?adf version=\"1.0\"?>\n";
$msgtext .= "<adf>\n";
$msgtext .= "<prospect>\n";
$msgtext .= "<requestdate>\n";
$msgtext .= "$the_date\n";
$msgtext .= "</requestdate>\n";
$msgtext .= "<vehicle>\n";
$msgtext .= "<year>$fields{'Year'}</year>\n";
$msgtext .= "<make>$fields{'Make'}</make>\n";
$msgtext .= "<model>$fields{'Model'}</model>\n";
$msgtext .= "<stock>$fields{'Stock'}</stock>\n";
$msgtext .= "<price type=\"asking\">$fields{'Price'}</price>\n";
$msgtext .= "</vehicle>\n";
$msgtext .= "<customer>\n";
$msgtext .= "<contact>\n";
$msgtext .= "<name part=\"full\">$fields{'name'}</name>\n";
$msgtext .= "<phone type=\"voice\">$fields{'phone'}</phone>\n";
$msgtext .= "<email>$fields{'submit_by'}</email>\n";
$msgtext .= "<address type=\"home\">\n";
$msgtext .= "<street line=\"1\">$fields{'address'}</street>\n";
$msgtext .= "<city>$fields{'city'}</city>\n";
$msgtext .= "<regioncode>$fields{'state'}</regioncode>\n";
$msgtext .= "<postalcode>$fields{'zip'}</postalcode>\n";
$msgtext .= "<country>US</country>\n";
$msgtext .= "</address>\n";
$msgtext .= "</contact>\n";
$msgtext .= "<comments>$fields{'Comments'}</comments>\n";
$msgtext .= "</customer>\n";
$msgtext .= "<vendor>\n";
$msgtext .= "<vendorname>\n";
$msgtext .= "<name part=\"full\">Dealership Website</name>\n";
$msgtext .= "</vendorname>\n";
$msgtext .= "<contact>\n";
$msgtext .= "<name part=\"full\">xx</name>\n";
$msgtext .= "</contact>\n";
$msgtext .= "</vendor>\n";
$msgtext .= "</prospect>\n";
$msgtext .= "</adf>\n";
Then lead management system gets the lead and stores the data. Problem is I have to make a specific XML form processor for each individual form, because the fields vary.
Is that standard or is there any easier way to do process a form and have the results be sent in XML format?
Clear as mud?
thx :-)
Form is processed by a CGI Scprit which has been modified to send the output in XML Format like this:
$msgtext="";
$msgtext .= "<?xml version=\"1.0\"?>\n";
$msgtext .= "<?adf version=\"1.0\"?>\n";
$msgtext .= "<adf>\n";
$msgtext .= "<prospect>\n";
$msgtext .= "<requestdate>\n";
$msgtext .= "$the_date\n";
$msgtext .= "</requestdate>\n";
$msgtext .= "<vehicle>\n";
$msgtext .= "<year>$fields{'Year'}</year>\n";
$msgtext .= "<make>$fields{'Make'}</make>\n";
$msgtext .= "<model>$fields{'Model'}</model>\n";
$msgtext .= "<stock>$fields{'Stock'}</stock>\n";
$msgtext .= "<price type=\"asking\">$fields{'Price'}</price>\n";
$msgtext .= "</vehicle>\n";
$msgtext .= "<customer>\n";
$msgtext .= "<contact>\n";
$msgtext .= "<name part=\"full\">$fields{'name'}</name>\n";
$msgtext .= "<phone type=\"voice\">$fields{'phone'}</phone>\n";
$msgtext .= "<email>$fields{'submit_by'}</email>\n";
$msgtext .= "<address type=\"home\">\n";
$msgtext .= "<street line=\"1\">$fields{'address'}</street>\n";
$msgtext .= "<city>$fields{'city'}</city>\n";
$msgtext .= "<regioncode>$fields{'state'}</regioncode>\n";
$msgtext .= "<postalcode>$fields{'zip'}</postalcode>\n";
$msgtext .= "<country>US</country>\n";
$msgtext .= "</address>\n";
$msgtext .= "</contact>\n";
$msgtext .= "<comments>$fields{'Comments'}</comments>\n";
$msgtext .= "</customer>\n";
$msgtext .= "<vendor>\n";
$msgtext .= "<vendorname>\n";
$msgtext .= "<name part=\"full\">Dealership Website</name>\n";
$msgtext .= "</vendorname>\n";
$msgtext .= "<contact>\n";
$msgtext .= "<name part=\"full\">xx</name>\n";
$msgtext .= "</contact>\n";
$msgtext .= "</vendor>\n";
$msgtext .= "</prospect>\n";
$msgtext .= "</adf>\n";
Then lead management system gets the lead and stores the data. Problem is I have to make a specific XML form processor for each individual form, because the fields vary.
Is that standard or is there any easier way to do process a form and have the results be sent in XML format?
Clear as mud?
thx :-)
#4
Posted 10 August 2007 - 06:07 PM
So it POSTs the resulting XML string to the leads system?
Most languages have a variety of different methods for working with XML. From generating it from a database, to providing function sets to build and manipulate it. I'd say there's quite a few ways to do what you want. The method you'd got should work fine, it's just a "from scratch" kind of way to do things.
I don't really know cgi and I'm not sure anyone around here does much of it, but there's plenty of people here that could help you do the same thing in PHP or one of the other popular languages.
Most languages have a variety of different methods for working with XML. From generating it from a database, to providing function sets to build and manipulate it. I'd say there's quite a few ways to do what you want. The method you'd got should work fine, it's just a "from scratch" kind of way to do things.
I don't really know cgi and I'm not sure anyone around here does much of it, but there's plenty of people here that could help you do the same thing in PHP or one of the other popular languages.
Share this topic:
Page 1 of 1


Help
This topic is locked

MultiQuote









