TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,911
  • Total Topics: 21,307
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 361
  • Total: 362
  • tino

Article - New topic form (pre-formated topic)

Started by londonhogfan, April 20, 2006, 05:14:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

londonhogfan

I really like that.

please let us know if it works.

do you have a test account setup?

Omniverse

No, it doesnt register for you, just creates a standardized form for taking an app on a board. Keeps em all the same, and purdy :P




<div align='center'>
<body bgcolor='#666666'> 

<table>
<tr><td><font color="#FF0000">
Please fill out the Application completely.</font><br>
<br>

<form name='frmFill'>
<table>
<tr><td><font color="#FFFFCC">
Real first name: </td><td><input type='text' name='txtRealName' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
Age: </td><td><input type='text' name='txtAge' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
Location: </td><td><input type='text' name='txtLocation' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
Current status (RL): </td><td><input type='text' name='txtCStat' value='employed, school, etc...' size='50'></td>
</tr>
<tr><td><font color="#FFFFCC">
Main Character Name: </td><td><input type='text' name='txtMCName' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
Class: </td><td><input type='text' name='txtClass' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
Level: </td><td><input type='text' name='txtLevel' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
Playtime: </td><td><input type='text' name='txtPlaytime' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
Favored Classes: </td><td><input type='text' name='txtFavClass' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
D&D PnP Experience: </td><td><input type='text' name='txtPnPXP' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
MMO experience: </td><td><input type='text' name='txtMMOXP' size='50' value=''></td>
</tr></font>
</table>
<br /><font color="#FFFFCC">
Are you currently in a guild or have you previously been guilded? <input type='radio' name='optCPG' value='Yes' >Yes <input type='radio' name='optCPG' value='No' checked>No<br />
<br />
If yes why did/do you wish to leave that guild?<br />
<textarea class='editor' rows='5' cols='60' style='color: #800000' name='taExpGuildLeave'></textarea><br />
<br />
Referral:<br />
<textarea class='editor' rows='5' cols='60' style='color: #800000' name='taReferral'>
How did you hear about us? Website, a friend refer you? Please be descriptive, don't just give a name, tell us how you know them.
</textarea><br />
<hr />
<br />Please give descriptive responses with the following questions. Minimum 3 sentences each.<br /><br />

What are your goals in game?<br />
<textarea class='editor' rows='5' cols='60' style='color: #800000' name='taGoals'></textarea><br /><br />


Why do you want to Join Kindred Spirits?<br />
<textarea class='editor' rows='5' cols='60' style='color: #800000' name='taWhyJoin'></textarea><br /><br />

<hr />
(Optional) Other Comments: <br />
<textarea class='editor' rows='5' cols='60' style='color: #800000' name='taComments'></textarea><br /><br />


</form>


<br />
<form action='http://www.test.gaminghole.org/index.php?action=post;board=3.0' method='post' name='postmodify' target='_parent' id='postmodify' style='margin: 0;'>
<input type='hidden' name='subject'>
<input name='icon' id='icon' value='xx' type='hidden'>
<input type='hidden' name='message'>
<input type='hidden' name='sc' value='', $context['session_id'], '' />

</form>


<script>


function CompileForm()
{

strRFN=document.frmFill.txtRealName.value;
strAge=document.frmFill.txtAge.value;
strLoc=document.frmFill.txtLocation.value;
strCS=document.frmFill.txtCStat.value;
strMCN=document.frmFill.txtMCName.value;
strClass=document.frmFill.txtClass.value;
strLvl=document.frmFill.txtLevel.value;
strPlytm=document.frmFill.txtPlaytime.value;
strFavClass=document.frmFill.txtFavClass.value;
strPnPXp=document.frmFill.txtPnPXP.value;
strMMOXp=document.frmFill.txtMMOXP.value;
if(document.frmFill.optCPG[0].checked)
{
strOtherGuild=document.frmFill.optCPG[0].value;
}
else
{
strOtherGuild=document.frmFill.optCPG[1].value;
}
strGuildLeave=document.frmFill.taExpGuildLeave.value;
strRef=document.frmFill.taReferral.value;
strGoals=document.frmFill.taGoals.value;
strWhy=document.frmFill.taWhyJoin.value;
strComments=document.frmFill.taComments.value;


str1='Real first name: ';
str2='\nAge: ';
str3='\nLocation: ';
str4='\nCurrent status (RL): ';
str5='\nCharacter Name: ';
str6='\nClass: ';
str7='\nLevel: ';
str8='\nPlaytime: ';
str9='\nFavored Classes: ';
str10='\nD&D PnP Experience: ';
str11='\nMMO experience: ';
str12='\nAre you currently in a guild or have you previously been guilded?\n';
str13='\nWhy did/do you wish to leave that guild?\n';
str14='\n\nReferral:\n';
str15='\n\nWhat are your goals in game?\n';
str16='\n\nWhy do you want to Join Kindred Spirits?\n';
str17='\n\n(Optional) Other Comments:\n\n';

strPart1=str1+strRFN+str2+strAge+str3+strLoc+str4+strCS+str5+strMCN+str6+strClass+str7+strLvl+str8+strPlytm+str9+strFavClass+str10+strPnPXp+str11+strMMOXp+str12+strOtherGuild;
strPart2=str13+strGuildLeave;
strPart3=str14+strRef+str15+strGoals+str16+strWhy;
strPart4=str17+strComments;


strCompiled=strPart1+strPart2+strPart3+strPart4;

document.postmodify.subject.value=strMCN;
document.postmodify.message.value=strCompiled;

document.postmodify.submit();


}

</script>

</td></tr></table>
</div>
<div align='center'>
<font size="4" color="#FF0000"><span style="background-color: #000000">
<br />By submitting an Application with us, you are confirming you have read, and understand, the Guild Charter and Policies. If accepted as a recruit, you agree to abide by it, and any other guidelines we set.<br /><br /> </span></font>
<input type='button' name='btnSubmit' value='Submit' onclick='CompileForm()'>
<br /><font color="#FFFFCC">Once submitted, it will take you to a pre-formatted post on the member applications board, where you will still need to hit the post button. </font><br />
<br />

</div>




Thats the code I used. If you wish to try it, my test site:
http://www.test.gaminghole.org/index.php

test account: testhole/hole

As with most things like this, I put that code into an htm/php file (whatever you prefer), then call it to an iframe in an article.
You, of course, will also have to put in some work to modify it to your own application wants. :)

technodragon73

Works very nicely...anyway to have it autofill the subject?

Omniverse

It does, where you see the entry: Main Character Name

That gets placed into the subject. So the name of the character they applying with is the topic. :)

technodragon73

heh....i tried it at my site and the subject wouldn't fill in...hmmmm....i'll look at it some more.

DrakeBrimstone

Just an FYI, I'm the Officer he spoke of that tweaked it, though I more then just tweaked it, I completely re-wrote it. The basic concept is it's 2 different forms, the first form contains all the nice pretty fields, the second form is completely hidden. When you click the button (It is not even of the submit type) it calls a Javascript function to compile the information, stuffs it into the hidden fields in the second form and submits that from giving a nice pre-formatted post. Considering all the intrested I'll have to get to work on making it a bit more edit friendly and add in some Validation. (Something I was meaning to do anyway.)

Porky

works great, is there a way for it to post without registering? like for guests...?

stigmartyr

No too bad, not too bad.. still needs work tho.  It should work for guests.  No registration neccessary.

DrakeBrimstone

It would probably work for guests if you set it up to post on a board that allows guests to post.

technodragon73

Actually you're right...if you set the board that the form posts is to allow guests then they won't have to register.

This website is proudly hosted on Crocweb Cloud Website Hosting.