I am using the below code for my WordPress site which is emailing all the form details as an HTML text but
I need the details to be written into a PDF first and then have to email the PDF as an attachment. How can
I achieve this? This is not a PHP code to use PHP's writePDF modules. So, any idea or any code to implement this?
<div style="padding-left: 100px;">
[raw]
[contact-form subject="Best Aussie Broker" to="
[email protected]"]
<div id="main34" style="border: 1px solid black; border-radius: 15px; width: 720px; padding: 15px;">
<h2><span style="color: #ff6600;">Express Application</span></h2>
[contact-field label="First Name" type="name" required="true" /]
[contact-field label="Last Name" type="text" /]
[contact-field label="Email" type="email" required="true" /]
[contact-field label="Purpose of Finance?" type="select" options="Home Loan,Refinance,Investment Loan,Debt Consolidation,Other" /]
[contact-field label="Your deposit amount" type="text" /]
[contact-field label="Amount you need to borrow?" type="text" /]
[contact-field label="Brief description of the purpose for finance" type="textarea" required="true" /]
<div><label></label>
<input class="radio" type="radio" name="19" value="Single Application" onchange="showsingle();" />
<label class="radio">Single Application</label>
<div class="clear-form"></div>
<input class="radio" type="radio" name="19" value="Joint Application" onchange="showjoint();" />
<label class="radio">Joint Application</label>
<div class="clear-form"></div>
[contact-field label="Privacy Act" type="checkbox" required="true" /]
I have read the Privacy Act 1988 (as Amended) and understand that by selecting the submit button I/we Authorize Best Aussie Broker to act on my/our behalf and manage personal information
in relation to this application.<br>
<a href="http://googleplex.com.au/pdf.pdf"><img src="http://googleplex.com.au/pdf.png" alt="" /> </a>
</div>
</div>
<div id="single" style="display: none; width: 720px; border: 1px solid black; border-radius: 15px; padding: 15px; margin-top: 10px;">
<div style="padding-top: 10px; width: 720px; text-align: left;">
<h4><span style="color: #ff6600;">Last step then we will get all listed Australian vendors to fight it out for your
best deal</span></h4>
</div>
<div>
<label class="select" for="19-date-of-birth">Date of Birth</label>
[contact-field label="Day" type="select" options="1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31" /]
[contact-field label="Month" type="select" options="January,February,March,April,May,June,July,August,September,October,November,December" /]
[contact-field label="Year" type="select" options="2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,197,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1951,1950,1949,1948,1947,1946,1945,1944,1943,1942,1941,1940,1939,1938,1937,1936,1935,1934,1933,1932,1931,1930,1929,1928,1927,1926,1925,1924,1923,1922,1921,1920, 1919,1918,1917,1916,1915,1914,1913,1912,1911,1910,1909" /]
</div>
[contact-field label="Address" type="text" /]
[contact-field label="Suburb" type="text" /]
[contact-field label="Postcode" type="text" /]
<div>
[contact-field label="State" type="select" options="VIC,NSW,QLD,SA,WA,TAS,NZ,Other" /]
</div>
[contact-field label="Best Contact" type="radio" options="Landline,Mobile" /]
[contact-field label="Phone Number" type="text" /]
[contact-field label="Marital Status" type="select" options="Married,Single,Other" /]
[contact-field label="Residential Status" type="select" options="Renting, Home Owned, Home Mortgage, Board, Other" /]
[contact-field label="Children/Dependents" type="select" options="0,1,2,3,4,5,6" /]
<div></div>
[contact-field label="Gross Yearly Income" type="text" /]
[contact-field label="Current Employer" type="text" /]
<div>
<label class="select" for="19-year-of-empl">Time at this employer</label>
[contact-field label="Year" type="select" options="0,1,2,3,4,5,6,7,8,9,10,More" /]
[contact-field label="Month" type="select" options="0,1,2,3,4,5,6,7,8,9,10,
11,12" /]
</div>
<div style="padding-right: 15px;"></div>
</div>
<div id="joint" style="display: none; width: 720px; border: 1px solid black; border-radius: 15px; padding: 15px; margin-top: 10px;">
<div style="padding-top: 10px; width: 720px; text-align: left;">
<h4><span style="color: #ff6600;">Last step then we will get all listed Australian vendors to fight it out for your
best deal</span></h4>
</div>
<div style="float: left; width: 320px;">
<div>
<label class="select" for="19-date-of-birth1">Date of Birth</label>
[contact-field label="Day" type="select" options="1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31" /]
[contact-field label="Month" type="select" options="January,February,March,April,May,June,July,August,September,October,November,December" /]
[contact-field label="Year" type="select" options="2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,197,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1951,1950,1949,1948,1947,1946,1945,1944,1943,1942,1941,1940,1939,1938,1937,1936,1935,1934,1933,1932,1931,1930,1929,1928,1927,1926,1925,1924,1923,1922,1921,1920, 1919,1918,1917,1916,1915,1914,1913,1912,1911,1910,1909" /]
</div>
[contact-field label="Address" type="text" /]
[contact-field label="Suburb" type="text" /]
[contact-field label="Postcode" type="text" /]
<div>
[contact-field label="State" type="select" options="VIC,NSW,QLD,SA,WA,TAS,NZ,Other" /]
</div>
[contact-field label="Best Contact" type="radio" options="Landline,Mobile" /]
[contact-field label="Phone Number" type="text" /]
<div></div>
<div></div>
[contact-field label="Marital Status" type="select" options="Married,Single,Other" /]
[contact-field label="Residential Status" type="select" options="Renting, Home Owned, Home Mortgage, Board, Other" /]
[contact-field label="Children/Dependents" type="select" options="0,1,2,3,4,5,6" /]
<div></div>
<div><label class="text" for="netincome">Net Income</label>
<input id="netincome" type="text" name="netincome" /> <select id="netincome-dropdown" name="netincome-dropdown"> <option>Monthly</option> <option>Yearly</option> </select></div>
[contact-field label="Current Employer" type="text" /]
<div>
<label class="select" for="19-year-of-empl2">Time at this employer</label>
[contact-field label="Year" type="select" options="0,1,2,3,4,5,6,7,8,9,10,More" /]
[contact-field label="Month" type="select" options="0,1,2,3,4,5,6,7,8,9,10,
11,12" /]
</div>
</div>
<div style="float: right; width: 320px; padding-right: 50px;">
<div>
<label class="select" for="19-date-of-birth3">Date of Birth</label>
[contact-field label="Day" type="select" options="1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31" /]
[contact-field label="Month" type="select" options="January,February,March,April,May,June,July,August,September,October,November,December" /]
[contact-field label="Year" type="select" options="2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,197,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1951,1950,1949,1948,1947,1946,1945,1944,1943,1942,1941,1940,1939,1938,1937,1936,1935,1934,1933,1932,1931,1930,1929,1928,1927,1926,1925,1924,1923,1922,1921,1920, 1919,1918,1917,1916,1915,1914,1913,1912,1911,1910,1909" /]
</div>
[contact-field label="Address" type="text" /]
[contact-field label="Suburb" type="text" /]
[contact-field label="Postcode" type="text" /]
<div>
[contact-field label="State" type="select" options="VIC,NSW,QLD,SA,WA,TAS,NZ,Other" /]
</div>
[contact-field label="Best Contact" type="radio" options="Landline,Mobile" /]
[contact-field label="Phone Number" type="text" /]
<div></div>
<div></div>
[contact-field label="Marital Status" type="select" options="Married,Single,Other" /]
[contact-field label="Residential Status" type="select" options="Renting, Home Owned, Home Mortgage, Board, Other" /]
[contact-field label="Children/Dependents" type="select" options="0,1,2,3,4,5,6" /]
<div></div>
<div><label class="text" for="netincome">Net Income</label>
<input id="netincome" type="text" name="netincome" /> <select id="netincome-dropdown" name="netincome-dropdown"> <option>Monthly</option> <option>Yearly</option> </select></div>
[contact-field label="Current Employer" type="text" /]
<div>
<label class="select" for="19-year-of-empl">Time at this employer</label>
[contact-field label="Year" type="select" options="0,1,2,3,4,5,6,7,8,9,10,More" /]
[contact-field label="Month" type="select" options="0,1,2,3,4,5,6,7,8,9,10,
11,12" /]
</div>
</div>
<div style="clear: both;"></div>
<div></div>
</div>
[/contact-form][/raw]
</div>