それが何と呼ばれているのか正確にはわかりませんが、下部に2つのラジオボタンがあり、クライアントを持っているかどうかを示すフォームが本当に欲しいです。フォームが表示されます。ここにファイルのコードがあります。これは PHP です。
<html>
<body>
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$to = "email" ;
$subject = "New Enquiry" ;
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$address = $_REQUEST['address'] ;
$address2 = $_REQUEST['address2'] ;
$postcode = $_REQUEST['postcode'] ;
$city = $_REQUEST['city'] ;
$tel = $_REQUEST['tel'] ;
$tel2 = $_REQUEST['tel2'] ;
$club = $_REQUEST['club'] ;
$which = ", " . $_REQUEST['which'] ;
$passdetails = $_REQUEST['updates'] ;
$cname = $_REQUEST['cname'] ;
$ctel = $_REQUEST['ctel'] ;
$cloan = $_REQUEST['cloan'] ;
$creasons = $_REQUEST['creasons'] ;
$message = "Name: " . $name . "\n Email: " . $email . "\n Address: " . $address . ", " . $address2 . "\n Postcode: " . $postcode . "\n City: " . $city . "\n Telephone Number: " . $tel . "\n Alternative Number: " . $tel2 . "\n Member of a club?: " . $club . $which . "\n Can use details: " . $passdetails . "\n" . "\n Client Details (Optional): " . "\n" . "\n Client Name: " . $cname . "\n Client Telephone Number: " . $ctel . "\n Loan Amount: " . $cloan . "\n Reasons for loan: " . $creasons ;
$from = "Introducer Registration" ;
mail($to,$subject,$message,"From: " . $from) ;
echo "<p style='font-size:12px;font-family:helvetica;color:#000000;'>Thank you for using our enquiry form, a member of the team will contact you as soon as they can.</p>";
}
else
//if "email" is not filled out, display the form
{
echo "<form action='register.php' method='post' style='width:21cm;font-family:helvetica;font-size:12px;'>
<p style='font-size:12px;padding-bottom:3px;margin-bottom:3px;'><I>* = required</I></p>
<label>Name*</label><label style='margin-left:353px;'>Email*</label><br />
<input type='text' style='width:10cm;padding-top:4px;' name='name' />
<input type='text' style='width:10cm;padding-top:4px;margin-left:10px;' name='email' />
<br />
<label>Address Line One*</label><label style='margin-left:289px;'>Address Line Two</label><br />
<input type='text' style='width:10cm;padding-top:4px;' name='address' />
<input type='text' style='width:10cm;padding-top:4px;margin-left:10px;' name='address2' />
<br />
<label>Town/City</label><label style='margin-left:338px;'>Postcode*</label><br />
<input type='text' style='width:10cm;padding-top:4px;margin-bottom:0px;' name='city' />
<input type='text' style='width:10cm;padding-top:4px;margin-left:10px;' name='postcode' />
<br />
<label>Phone Number*</label><label style='margin-left:304px;'>Alternative Number</label><br />
<input type='text' style='width:10cm;padding-top:4px;margin-bottom:0px;' name='tel' />
<input type='text' style='width:10cm;padding-top:4px;margin-left:10px;margin-bottom:0px;' name='tel2' />
<br />
<br />
<label style='margin-top:-10px;'>Are you a member of a club?*</label><label style='margin-left:231px;margin-top:-10px;'>If yes, which club?</label><br />
<input type='radio' name='club' value='Yes' style='margin-top:-10px;' /><span style='font-family:source sans pro;color:#000000;'>Yes</span>
<input type='radio' name='club' value='No' /><span style='font-family:source sans pro;color:#000000;'>No</span>
<input type='text' name='which' style='font-family:source sans pro;color:#000000;;width:10cm;margin-left:320px;margin-top:0px;' />
<br />
<br />
<input type='hidden' name='updates' value='Yes' />
<input type='checkbox' name='updates' value='No'/><label style='font-family:source sans pro;color:#000000;' value='updates'>*If you <u>DO NOT</u> wish to be contacted by affiliated companies with potentially helpful products and services, please tick this box.</label>
<br />
<br />
<h9 style='font-size:14px;'>Enter Client Details for assessment <i>(optional)</i></h9>
<br />
<br />
<label>Name</label><label style='margin-left:360px;'>Phone Number</label><br />
<input type='text' style='font-family:source sans pro;color:#000000;width:10cm;padding-top:4px;' name='cname' />
<input type='text' style='font-family:source sans pro;color:#000000;width:10cm;padding-top:4px;margin-left:10px;' name='ctel' />
<br />
<label>Loan Amount</label><label style='margin-left:319px;'>Reasons for loan</label><br />
<input type='text' style='font-family:source sans pro;color:#000000;width:10cm;padding-top:4px;' name='cloan' />
<input type='text' style='font-family:source sans pro;color:#000000;width:10cm;padding-top:4px;margin-left:10px;' name='creasons' />
<br />
<br />
<input style='margin-left:713px;padding:0;' type='submit' value='Submit' />
</form>";
}
?>
</body>
</html>
「評価のためにクライアントの詳細を入力する前に、クライアントがクライアントの詳細を入力するかどうかを選択できるようにしたいのですが、フォームがある場合はフォームがドロップダウンしますが、すべてが電子メールで送信されます。彼らは同じメールにいます。
ご協力いただきありがとうございます!