HTML Form coding
3 posters
Page 1 of 1
HTML Form coding
alright so I've found an old topic a guy brought up a coding for a form which automatically creates a new thread on the forums when submitted and I'm also in need of it
https://help.forumotion.com/t96841-forms?highlight=forms
Thats the topic and this code even works for me but when I change the questions it bugs the form so i need someones help with editing this code and replace with the questions that i need.
Name: (Answer should be within a text box)
Nature of Request : (Multiple Choice- Usergroup, Usertitle, Moderation, Other)
Details : (Text area)
I simply need this code to generate the above questions and the topic title to be "Name's Administrative Request"
https://help.forumotion.com/t96841-forms?highlight=forms
Thats the topic and this code even works for me but when I change the questions it bugs the form so i need someones help with editing this code and replace with the questions that i need.
Name: (Answer should be within a text box)
Nature of Request : (Multiple Choice- Usergroup, Usertitle, Moderation, Other)
Details : (Text area)
I simply need this code to generate the above questions and the topic title to be "Name's Administrative Request"
- Code:
<script type="text/javascript">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
function sendMessage(form){[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
if(form.element_0.value == "" || form.element_1.value == "" || form.element_2.value == ""[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
|| form.element_3.value == "" || form.element_5.value == "" || form.element_7.value == "" )[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
{[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
document.getElementById("errormsg").innerHTML ="YOU MUST COMPLETE ALL FIELDS MARKED WITH AN (*) !";[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
return false;[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
}[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
else[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
{[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var name =form.element_0.value[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var firstname =form.element_1.value[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var age =form.element_2.value[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var primary =form.element_3.value[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var prefergame =form.element_5.value[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var specify =form.element_6.value[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var findforum =form.element_7.value[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var clans =form.element_10.value[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var other =form.element_11.value[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var reason = "";[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
if(form.element_9[0].checked == true)[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
reason = form.element_9[0].value;[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
else if(form.element_9[1].checked == true)[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
reason = form.element_9[1].value;[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
else if(form.element_9[2].checked == true)[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
reason = form.element_9[2].value;[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
else if(form.element_9[3].checked == true)[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
reason = form.element_9_other.value;[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
var txt_message = "[font=Verdana][b]Username[/b][/font] : " + name + '\n'[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
+ "[font=Verdana][b]Your first name[/b][/font] : " + firstname + '\n'[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
+ "[font=Verdana][b]Your age[/b][/font] : " + age + '\n'[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
+ "[font=Verdana][b]Primary platform [/b][/font] : " + primary + '\n'[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
+ "[font=Verdana][b]Platforms owned [/b][/font] : [list]";[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
for(var i = 0; i < form.element_4.length; i++)[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
{[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
if(form.element_4[i].checked == true) { txt_message += form.element_4[i].value + '\n'; }[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
}[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
txt_message += "[/list][font=Verdana][b]Preferred Game[/b][/font] : " + prefergame + '\n';[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
if(specify != "")[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
txt_message += "[font=Verdana][b]Other - Specify[/b][/font] : " + specify + '\n';[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
txt_message += "[font=Verdana][b]Site referred or referr[/b][/font] : " + findforum + '\n'[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
+ "[font=Verdana][b]Country of residance[/b][/font] : ";[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
for(var i = 0; i < form.element_8.length; i++)[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
{[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
if(form.element_8[i].checked == true) { txt_message += " - " + form.element_8[i].value + " "; }[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
}[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
txt_message += '\n' + "[font=Verdana][b]Why are you here? [/b][/font] : " + reason + '\n';[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
if(clans != "")[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
txt_message += "[font=Verdana][b]Any previous clans[/b][/font] : " + clans + '\n';[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
if(other != "")[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
txt_message += "[font=Verdana][b]Other Infomation[/b][/font] : " + other + '\n';[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
// Insère le texte construit dans le champ caché "message" du formulaire[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
form.message.value = txt_message;[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
form.subject.value = "Presentation of " + name ;[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
return true;[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
}[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
}[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</script>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<form id="emf-form" action="/post" method="post" name="post" enctype="multipart/form-data" onSubmit="return(sendMessage(this))">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input type="hidden" name="lt" value="0" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input type="hidden" name="mode" value="newtopic" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input type="hidden" name="topictype" value="0" checked="checked" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input type="hidden" name="message" value="" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input type="hidden" name="f" value="1" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input name="subject" type="hidden" value="" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<table style="text-align:left;" cellpadding="2" cellspacing="0" border="0" bgcolor="#000000">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td colspan="2">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b style="font-size:20px;">Flawless Concepts</b><br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<label style="font-size:15px;">Thank you for applying to our community.<br /></label><br /></font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_0" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Username</b></font> <span style="color:red;"><small>*</small></span>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_0" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_0" name="element_0" value="" size="20" class="validate[required,length[3,20]]" type="text" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<small><font face="Verdana">This is your registered user name on the forums.<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
Should NOT be sexual, sexist, abusive or vulgar</font></small>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_1" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Your first name</b></font> <span style="color:red;"><small>*</small></span>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_1" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_1" name="element_1" value="" size="30" class="validate[required]" type="text" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_2" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Your age</b></font> <span style="color:red;"><small>*</small></span>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_2" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_2" name="element_2" value="16+" size="5" class="validate[required]" type="text" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_3" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Primary platform</b></font> <span style="color:red;"><small>*</small></span>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_3" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<select id="element_3" name="element_3" class="validate[required]">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="PS3" selected="selected">PS3</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Xbox360">Xbox360</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="PC">PC</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Wii">Wii</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</select>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_4" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Platforms owned</b></font> <span style="color:red;"><small>*</small></span>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_4" face="Verdana" size="2" style="color:#2F3192">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_4_0" name="element_4" type="checkbox" value="PS3">PS3[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_4_1" name="element_4" type="checkbox" value="Xbox 360">Xbox 360[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_4_2" name="element_4" type="checkbox" value="PC">PC[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_4_3" name="element_4" type="checkbox" value="Wii">Wii<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<small><font face="Verdana">Select all consoles you own</font></small>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_5" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Preferred Game</b></font> <span style="color:red;"><small>*</small></span>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_5" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<select id="element_5" name="element_5" class="validate[required]">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="" selected="selected">Battlefield: Bad Company 2</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Battlefield 3">Battlefield 3</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="COD: Modern Warefare 2 ">COD: Modern Warefare 2</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="COD: Black Ops">COD: Black Ops</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="COD: Modern Warefare 3 ">COD: Modern Warefare 3</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Dead Island">Dead Island</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Gears of War 2">Gears of War 2</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Gears of War 3">Gears of War 3</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Halo 3">Halo 3</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Halo: Reach">Halo: Reach</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Homefront">Homefront</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<option value="Other - specify">Other - specify</option>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</select>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_6" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Other - Specify</b></font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_6" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_6" name="element_6" value="" size="30" class="validate[optional]" type="text" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_7" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Site referred or referr</b></font> <span style="color:red;"><small>*</small></span>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_7" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_7" name="element_7" value="How did you find us?" size="30" class="validate[required]" type="text" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_8" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Country of residance</b></font> <span style="color:red;"><small>*</small></span>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_8" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="width:100%;padding-bottom:5px;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_8_0" name="element_8" value="USA" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> USA </font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="width:100%;padding-bottom:5px;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_8_1" name="element_8" value="UK" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> UK </font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="width:100%;padding-bottom:5px;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_8_2" name="element_8" value="EU" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> EU </font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="width:100%;padding-bottom:5px;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_8_3" name="element_8" value="AUS" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> AUS </font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="width:100%;padding-bottom:5px;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_8_4" name="element_8" value="Caribbean" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> Caribbean </font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="clear:both;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_9" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Why are you here?</b></font> <span style="color:red;"><small>*</small></span>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_9" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="width:100%;padding-bottom:5px;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_9_0" name="element_9" value="Competitive Gaming" class="validate[required]" type="radio" /><font face="Verdana" size="2" color="#2F3192"> Competitive[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
Gaming </font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="width:100%;padding-bottom:5px;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_9_1" name="element_9" value="Casual Gaming" class="validate[required]" type="radio" /><font face="Verdana" size="2" color="#2F3192"> Casual Gaming </font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="width:100%;padding-bottom:5px;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_9_2" name="element_9" value="Make friends" class="validate[required]" type="radio" /><font face="Verdana" size="2" color="#2F3192"> Make friends </font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="width:100%;padding-bottom:5px;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_9_3" name="element_9" value="" class="validate[required]" type="radio" /><font face="Verdana" size="2" color="#2F3192"> Other </font><br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input style="margin-left:20px;" type="text" onclick="document.getElementById('element_9_3').checked = 'checked';" onchange "document.getElementById('element_9_3').value = this.value;" name="element_9_other" value="" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="clear:both;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_10" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Any previous clans<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
(names only)</b></font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_10" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input id="element_10" name="element_10" value="" size="20" class="validate[optional]" type="text" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_label_11" align="left">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192"><b>Other Infomation<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
(Tell us about gaming style, why you want to join, background... etc)<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
(Optional)</b></font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td id="td_element_field_11" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<textarea id="element_11" name="element_11" cols="45" rows="10" class="validate[optional]">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</textarea>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;"></div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr valign="top">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td colspan="2" >[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<h3 style="font-size:14px;padding:10px 0 6px 0;border-top:1px dotted #CCCCCC;margin:14px 0;position:static;" id="element_12" name="element_12">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<font face="Verdana" size="2" color="#2F3192">Agreement</font>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</h3>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<div style="padding-bottom:8px;color:#2f3192;">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<small><font face="Verdana">By completing and submitting this infomation you agree to the rules of our community and to being a loyal and active member by visiting and posting daily,[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
wearing our clan tag representing us to the best of your ablitites.<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<br />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
This application should not be submitted until you have read all the rules and have completely understood them and you are certain about being in our community.<br /></font></small>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</div>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<td colspan="2" align="center">[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<br><span style="color:orangered;" id="errormsg"></span><br><br>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
<input name="post" value="Send the message on the forum" type="submit" />[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</td>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</tr>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</table>[color=#2e8b57][font=Courier, CourierNew, sans-serif][/font][/color]
</form>
Re: HTML Form coding
Why do you mix HTML with BBCode?
mangaka- Forumember
-
Posts : 121
Reputation : 5
Language : Indonesia
Location : Well
Re: HTML Form coding
Can you please read the full thread.mangaka wrote:Why do you mix HTML with BBCode?
Re: HTML Form coding
Hello Rizi Scotch,
I am not sure if I got what you wanted correct, but here it is:
I renamed whichever fields that you described, so make sure everything is correct.
I am not sure if I got what you wanted correct, but here it is:
I renamed whichever fields that you described, so make sure everything is correct.
- Code:
<script type="text/javascript">
function sendMessage(form){
if(form.element_0.value == "" || form.element_1.value == "" || form.element_2.value == ""
|| form.element_3.value == "" || form.element_5.value == "" || form.element_7.value == "" )
{
document.getElementById("errormsg").innerHTML ="YOU MUST COMPLETE ALL FIELDS MARKED WITH AN (*) !";
return false;
}
else
{
var name =form.element_0.value
var firstname =form.element_1.value
var age =form.element_2.value
var primary =form.element_3.value
var prefergame =form.element_5.value
var specify =form.element_6.value
var findforum =form.element_7.value
var clans =form.element_10.value
var other =form.element_11.value
var reason = "";
if(form.element_9[0].checked == true)
reason = form.element_9[0].value;
else if(form.element_9[1].checked == true)
reason = form.element_9[1].value;
else if(form.element_9[2].checked == true)
reason = form.element_9[2].value;
else if(form.element_9[3].checked == true)
reason = form.element_9_other.value;
var txt_message = "[font=Verdana][b]Name[/b][/font] : " + name + '\n'
+ "[font=Verdana][b]Your first name[/b][/font] : " + firstname + '\n'
+ "[font=Verdana][b]Your age[/b][/font] : " + age + '\n'
+ "[font=Verdana][b]Primary platform [/b][/font] : " + primary + '\n'
+ "[font=Verdana][b]Nature of request [/b][/font] : [list]";
for(var i = 0; i < form.element_4.length; i++)
{
if(form.element_4[i].checked == true) { txt_message += form.element_4[i].value + '\n'; }
}
txt_message += "[/list][font=Verdana][b]Preferred Game[/b][/font] : " + prefergame + '\n';
if(specify != "")
txt_message += "[font=Verdana][b]Other - Specify[/b][/font] : " + specify + '\n';
txt_message += "[font=Verdana][b]Site referred or referr[/b][/font] : " + findforum + '\n'
+ "[font=Verdana][b]Country of residance[/b][/font] : ";
for(var i = 0; i < form.element_8.length; i++)
{
if(form.element_8[i].checked == true) { txt_message += " - " + form.element_8[i].value + " "; }
}
txt_message += '\n' + "[font=Verdana][b]Why are you here? [/b][/font] : " + reason + '\n';
if(clans != "")
txt_message += "[font=Verdana][b]Any previous clans[/b][/font] : " + clans + '\n';
if(other != "")
txt_message += "[font=Verdana][b]Other Information[/b][/font] : " + other + '\n';
// Insère le texte construit dans le champ caché "message" du formulaire
form.message.value = txt_message;
form.subject.value = "Presentation of " + name ;
return true;
}
}
</script>
<form id="emf-form" action="/post" method="post" name="post" enctype="multipart/form-data" onSubmit="return(sendMessage(this))">
<input type="hidden" name="lt" value="0" />
<input type="hidden" name="mode" value="newtopic" />
<input type="hidden" name="topictype" value="0" checked="checked" />
<input type="hidden" name="message" value="" />
<input type="hidden" name="f" value="1" />
<input name="subject" type="hidden" value="" />
<table style="text-align:left;" cellpadding="2" cellspacing="0" border="0" bgcolor="#000000">
<tr>
<td colspan="2">
<font face="Verdana" size="2" color="#2F3192"><b style="font-size:20px;">Flawless Concepts</b><br />
<label style="font-size:15px;">Thank you for applying to our community.<br /></label><br /></font>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_0" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Name</b></font> <span style="color:red;"><small>*</small></span>
</td>
<td id="td_element_field_0" >
<input id="element_0" name="element_0" value="" size="20" class="validate[required,length[3,20]]" type="text" />
<div style="padding-bottom:8px;color:#2f3192;">
<small><font face="Verdana">This is your registered user name on the forums.<br />
Should NOT be sexual, sexist, abusive or vulgar</font></small>
</div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_1" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Your first name</b></font> <span style="color:red;"><small>*</small></span>
</td>
<td id="td_element_field_1" >
<input id="element_1" name="element_1" value="" size="30" class="validate[required]" type="text" />
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_2" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Your age</b></font> <span style="color:red;"><small>*</small></span>
</td>
<td id="td_element_field_2" >
<input id="element_2" name="element_2" value="16+" size="5" class="validate[required]" type="text" />
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_3" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Primary platform</b></font> <span style="color:red;"><small>*</small></span>
</td>
<td id="td_element_field_3" >
<select id="element_3" name="element_3" class="validate[required]">
<option value="PS3" selected="selected">PS3</option>
<option value="Xbox360">Xbox360</option>
<option value="PC">PC</option>
<option value="Wii">Wii</option>
</select>
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_4" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Nature of request</b></font> <span style="color:red;"><small>*</small></span>
</td>
<td id="td_element_field_4" face="Verdana" size="2" style="color:#2F3192">
<input id="element_4_0" name="element_4" type="checkbox" value="PS3">Usergroup
<input id="element_4_1" name="element_4" type="checkbox" value="Xbox 360">Usertitle
<input id="element_4_2" name="element_4" type="checkbox" value="PC">Moderation
<input id="element_4_3" name="element_4" type="checkbox" value="Wii">Other<br />
<div style="padding-bottom:8px;color:#2f3192;">
<small><font face="Verdana">Select all consoles you own</font></small>
</div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_5" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Preferred Game</b></font> <span style="color:red;"><small>*</small></span>
</td>
<td id="td_element_field_5" >
<select id="element_5" name="element_5" class="validate[required]">
<option value="" selected="selected">Battlefield: Bad Company 2</option>
<option value="Battlefield 3">Battlefield 3</option>
<option value="COD: Modern Warefare 2 ">COD: Modern Warefare 2</option>
<option value="COD: Black Ops">COD: Black Ops</option>
<option value="COD: Modern Warefare 3 ">COD: Modern Warefare 3</option>
<option value="Dead Island">Dead Island</option>
<option value="Gears of War 2">Gears of War 2</option>
<option value="Gears of War 3">Gears of War 3</option>
<option value="Halo 3">Halo 3</option>
<option value="Halo: Reach">Halo: Reach</option>
<option value="Homefront">Homefront</option>
<option value="Other - specify">Other - specify</option>
</select>
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_6" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Other - Specify</b></font>
</td>
<td id="td_element_field_6" >
<input id="element_6" name="element_6" value="" size="30" class="validate[optional]" type="text" />
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_7" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Site referred or referr</b></font> <span style="color:red;"><small>*</small></span>
</td>
<td id="td_element_field_7" >
<input id="element_7" name="element_7" value="How did you find us?" size="30" class="validate[required]" type="text" />
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_8" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Country of residance</b></font> <span style="color:red;"><small>*</small></span>
</td>
<td id="td_element_field_8" >
<div style="width:100%;padding-bottom:5px;">
<input id="element_8_0" name="element_8" value="USA" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> USA </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_8_1" name="element_8" value="UK" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> UK </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_8_2" name="element_8" value="EU" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> EU </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_8_3" name="element_8" value="AUS" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> AUS </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_8_4" name="element_8" value="Caribbean" class="validate[required]" type="checkbox" /><font face="Verdana" size="2" color="#2F3192"> Caribbean </font>
</div>
<div style="clear:both;"></div>
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_9" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Why are you here?</b></font> <span style="color:red;"><small>*</small></span>
</td>
<td id="td_element_field_9" >
<div style="width:100%;padding-bottom:5px;">
<input id="element_9_0" name="element_9" value="Competitive Gaming" class="validate[required]" type="radio" /><font face="Verdana" size="2" color="#2F3192"> Competitive
Gaming </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_9_1" name="element_9" value="Casual Gaming" class="validate[required]" type="radio" /><font face="Verdana" size="2" color="#2F3192"> Casual Gaming </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_9_2" name="element_9" value="Make friends" class="validate[required]" type="radio" /><font face="Verdana" size="2" color="#2F3192"> Make friends </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_9_3" name="element_9" value="" class="validate[required]" type="radio" /><font face="Verdana" size="2" color="#2F3192"> Other </font><br />
<input style="margin-left:20px;" type="text" onclick="document.getElementById('element_9_3').checked = 'checked';" onchange "document.getElementById('element_9_3').value = this.value;" name="element_9_other" value="" />
</div>
<div style="clear:both;"></div>
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_10" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Any previous clans<br />
(names only)</b></font>
</td>
<td id="td_element_field_10" >
<input id="element_10" name="element_10" value="" size="20" class="validate[optional]" type="text" />
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_11" align="left">
<font face="Verdana" size="2" color="#2F3192"><b>Other Infomation<br />
<br />
<br />
Details<br />
<br />
(Optional)</b></font>
</td>
<td id="td_element_field_11" >
<textarea id="element_11" name="element_11" cols="45" rows="10" class="validate[optional]">
</textarea>
<div style="padding-bottom:8px;color:#2f3192;"></div>
</td>
</tr>
<tr valign="top">
<td colspan="2" >
<h3 style="font-size:14px;padding:10px 0 6px 0;border-top:1px dotted #CCCCCC;margin:14px 0;position:static;" id="element_12" name="element_12">
<font face="Verdana" size="2" color="#2F3192">Agreement</font>
</h3>
<div style="padding-bottom:8px;color:#2f3192;">
<small><font face="Verdana">By completing and submitting this infomation you agree to the rules of our community and to being a loyal and active member by visiting and posting daily,
wearing our clan tag representing us to the best of your ablitites.<br />
<br />
This application should not be submitted until you have read all the rules and have completely understood them and you are certain about being in our community.<br /></font></small>
</div>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<br><span style="color:orangered;" id="errormsg"></span><br><br>
<input name="post" value="Send the message on the forum" type="submit" />
</td>
</tr>
</table>
</form>

» help (form motion forum HTML coding)
» Contact Form Coding
» Coding help with Application form.
» HTML coding
» HTML coding
» Contact Form Coding
» Coding help with Application form.
» HTML coding
» HTML coding
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum