TinyPortal

Development => Block Codes => Topic started by: londonhogfan on April 20, 2006, 05:14:56 PM

Title: Article - New topic form (pre-formated topic)
Post by: londonhogfan on April 20, 2006, 05:14:56 PM
anyone know how to do this?

wanting to make a form in a article that forum members can fill out to join my cs clan.

The form would post a new (pre-formated) topic in our recruiting board with all the information.  Below is a list of the things I am wanting.  It would just have a textbox next to each thing so the member could input the information.

Name of topic would be: {In Game Alias} {Todays Date}

Quote
Todays Date: (dd/mm/yy)

In Game Alias:

First Name:

Email Address:

XFire Name:

Location(State or Country):

Age:

Invited By: (If any)

Leagues Played In: (If any)

Have you ever been an admin in another clan?:

Why do you want to join ~RoTa~?:

Have you read and understand the Code of Conduct?:

Do you understand our member/recruit process and requirements?:

Are you willing to uphold these at ALL times?:

Any other comments or suggestions?:

Could someone help me do this?  I think many people would want to be able to do something like this also.

Thanks, Jacob
Title: Re: Article - New topic form (pre-formated topic)
Post by: londonhogfan on April 26, 2006, 02:33:53 AM
any ideas? :'(
Title: Re: Article - New topic form (pre-formated topic)
Post by: elpvn on April 26, 2006, 03:19:09 AM
Me too, I want tweak a forum post with

{topic name}| {comment numbers}Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  {Hours/Dates}| {poster}

to views at the frontpage of portalÃ,  :'(
Title: Re: Article - New topic form (pre-formated topic)
Post by: stormlrd on April 26, 2006, 03:23:34 AM
the form itself wouldnt be hard to do but the problem comes when storing the info in the database I'd have to think on this one.
Title: Re: Article - New topic form (pre-formated topic)
Post by: stormlrd on April 26, 2006, 03:25:43 AM
it would require a special reply index form to do it with its destinitation already defined... not an easy project
Title: Re: Article - New topic form (pre-formated topic)
Post by: elpvn on April 26, 2006, 03:42:31 AM
Quote from: stormlrd on April 26, 2006, 03:25:43 AM
it would require a special reply index form to do it with its destinitation already defined... not an easy project

I see, but still a bit hope  ::)

Thanks bro
Title: Re: Article - New topic form (pre-formated topic)
Post by: stormlrd on April 26, 2006, 03:53:38 AM
why not do this

create the index of clan topics for each clan recruitment than click reply on each one of those forums snag the url at that stage than in your article post up that link with each clan description and whats to be stated.

Just a thought
Title: Re: Article - New topic form (pre-formated topic)
Post by: londonhogfan on April 26, 2006, 04:17:57 AM
Im not sure what you mean on that last post :o

but im just wanting it as simple as can be.

Even if it would open up everything just like a regular "new post" window but have those items already in the main textbox so they just had to put everything in next to it without copying it.  It would look nicer to have a small textbox for everything, but anything would be better than default.

I realize all it does is keep someone from having to copy/paste the requrired info into a new topic form, but I would still like it if possible.

I tried just doing this...

<div align="center">
<form action="http://www.the-rota.com/index.php?action=post2;board=5" method="post" name="postmodify" id="postmodify" style="margin: 0;">
Your Gaming Alias - dd/mm/yyyy<br>
<input type="text" name="subject" tabindex="1" size="80" maxlength="80" />
<br><br>
<input name="icon" id="icon" value="xx" type="hidden">
<textarea class="editor" name="message" rows="25" cols="60" tabindex="2">

In Game Alias:

First Name:

Email Address:

XFire Name:

Location(State or Country):

Age:

Invited By: (If any)

Leagues Played In: (If any)

Have you ever been an admin in another clan?:

Why do you want to join ~RoTa~?:

Have you read and understand the Code of Conduct?:

Do you understand our member/recruit process and requirements?:

Are you willing to uphold these at ALL times?:

Any other comments or suggestions?:

</textarea><br>

<input type="submit" name="post" value="Submit" tabindex="3">

</form>
</div>


that gives me this...

http://www.the-rota.com/index.php?page=21

but when I submit it says "Your session timed out while posting. Please try to re-submit your message. "
Title: Re: Article - New topic form (pre-formated topic)
Post by: stormlrd on April 26, 2006, 04:24:02 AM
hmmm not sure
Title: Re: Article - New topic form (pre-formated topic)
Post by: Omniverse on April 26, 2006, 05:47:45 AM
Interesting...

This could be a useful little tool for the thousands of clan/guilds out there.

Hopefully someone can figure it out  :knuppel2:
Title: Re: Article - New topic form (pre-formated topic)
Post by: MyFSI on April 28, 2006, 08:33:49 PM
Write this in a PHP article:


echo'
<div align="center">
<form action="http://www.the-rota.com/index.php?action=post2;board=5" method="post" name="postmodify" id="postmodify" style="margin: 0;">
Your Gaming Alias - dd/mm/yyyy<br>
<input type="text" name="subject" tabindex="1" size="80" maxlength="80" />
<br><br>
<input name="icon" id="icon" value="xx" type="hidden">
<textarea class="editor" name="message" rows="25" cols="60" tabindex="2">

In Game Alias:

First Name:

Email Address:

XFire Name:

Location(State or Country):

Age:

Invited By: (If any)

Leagues Played In: (If any)

Have you ever been an admin in another clan?:

Why do you want to join ~RoTa~?:

Have you read and understand the Code of Conduct?:

Do you understand our member/recruit process and requirements?:

Are you willing to uphold these at ALL times?:

Any other comments or suggestions?:

</textarea><br>

<input type="submit" name="post" value="Submit" tabindex="3">
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>
</div>';


notice the added line:
<input type="hidden" name="sc" value="', $context['session_id'], '" />
this will include your session id so it won't give you that error again.
Title: Re: Article - New topic form (pre-formated topic)
Post by: Porky on May 02, 2006, 09:41:38 AM
Get this error when I try that code

QuoteParse error: parse error, unexpected T_STRING in /home/capital/public_html/test/Sources/Load.php(1607) : eval()'d code(45) : eval()'d code on line 45
Title: Re: Article - New topic form (pre-formated topic)
Post by: londonhogfan on May 02, 2006, 03:12:13 PM
It worked for my site.  I appreciate you MyFSI.
Title: Re: Article - New topic form (pre-formated topic)
Post by: Porky on May 04, 2006, 02:13:33 AM
ok got the form to show up but when I hit submit it logs me out?
Title: Re: Article - New topic form (pre-formated topic)
Post by: Xarcell on May 04, 2006, 02:46:47 AM
I may be way off here, but I think it could be a SMF issue, however they tell me it's a server issue involving extra secruity.
Title: Re: Article - New topic form (pre-formated topic)
Post by: technodragon73 on May 04, 2006, 03:33:28 AM
Let me look into this...it may actually be something i can accomplish


EDIT:  Ok, I think i am on to something...however i am stalling a the call to create a new topic...

See my idea is to create a unique Post.php and Post.template.php for the sole purpose of the form you are requesting...however...the easiest way is to pre-poulate the needed info in the textarea...that way when a guest or member wants to apply they click a buttoin that is the direct link to create a new topic in a specified board.  When the post form comes up it will have all of the values that are needed for the application.  Obviously that info can be adjusted for whatever use is needed as well as the specific board that it posts to...I just don't understand quite well enough how the post and post template interact with each other.

The code for the text area in the post box is this:
echo '
<tr>
<td valign="top" align="right"></td>
<td>
<textarea class="editor" name="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '"', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? ' style="border: 1px solid red;"' : '', '>', $message, '</textarea>
</td>
</tr>';


You would change it to this (at least for this purpose anyway):
echo '
<tr>
<td valign="top" align="right"></td>
<td>
<textarea class="editor" name="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '"', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? ' style="border: 1px solid red;"' : '', '>
In Game Alias:

XFire Name:

Location(State or Country):

Age:

Invited By: (If any)

Leagues Played In: (If any)

Have you ever been an admin in another clan?:

Why do you want to join ~RoTa~?:

Have you read and understand the Code of Conduct?:

Do you understand our member/recruit process and requirements?:

Are you willing to uphold these at ALL times?:

Any other comments or suggestions?:

</textarea>
</td>
</tr>';


This would mean that when the special link is clicked the text area is already filled with the questions that are needed so when it is posted it would appear as needed.
Title: Re: Article - New topic form (pre-formated topic)
Post by: londonhogfan on May 04, 2006, 05:54:49 AM
the one I posted a few back works perfectly

try it out if you like.

http://www.the-rota.com/index.php?page=11

Im just using the code MyFSI gave me earlier.
Title: Re: Article - New topic form (pre-formated topic)
Post by: londonhogfan on May 08, 2006, 03:04:36 PM
well it was working.  Not anymore.
Title: Re: Article - New topic form (pre-formated topic)
Post by: Omniverse on May 09, 2006, 03:23:39 AM
I was playing with this at my guild site, and one of the officers saw it and thought they could tweak it.

He did, and this is the end result:

http://www.gaminghole.org/ks/index.php?page=24

I set up a little page before that with some recruiting info, then a link to that.

Thought i would let you guys see it, and get your thoughts  :2funny:

I'll try and get the code up for it later. Wanted to ask his permission before i did. :)

Title: Re: Article - New topic form (pre-formated topic)
Post by: technodragon73 on May 09, 2006, 04:29:56 AM
is it supposed to make you register?  I thought you were looking for a way for guests to post the app.

Otherwise it looks very cool and hope to see the code for it soon 8)
Title: Re: Article - New topic form (pre-formated topic)
Post by: londonhogfan on May 09, 2006, 04:59:25 AM
I really like that.

please let us know if it works.

do you have a test account setup?
Title: Re: Article - New topic form (pre-formated topic)
Post by: Omniverse on May 09, 2006, 06:52:22 PM
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. :)
Title: Re: Article - New topic form (pre-formated topic)
Post by: technodragon73 on May 10, 2006, 06:11:00 AM
Works very nicely...anyway to have it autofill the subject?
Title: Re: Article - New topic form (pre-formated topic)
Post by: Omniverse on May 10, 2006, 07:23:39 AM
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. :)
Title: Re: Article - New topic form (pre-formated topic)
Post by: technodragon73 on May 10, 2006, 01:59:53 PM
heh....i tried it at my site and the subject wouldn't fill in...hmmmm....i'll look at it some more.
Title: Re: Article - New topic form (pre-formated topic)
Post by: DrakeBrimstone on May 11, 2006, 01:12:36 AM
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.)
Title: Re: Article - New topic form (pre-formated topic)
Post by: Porky on May 11, 2006, 10:36:05 AM
works great, is there a way for it to post without registering? like for guests...?
Title: Re: Article - New topic form (pre-formated topic)
Post by: stigmartyr on May 11, 2006, 02:32:34 PM
No too bad, not too bad.. still needs work tho.  It should work for guests.  No registration neccessary.
Title: Re: Article - New topic form (pre-formated topic)
Post by: DrakeBrimstone on May 12, 2006, 12:51:04 AM
It would probably work for guests if you set it up to post on a board that allows guests to post.
Title: Re: Article - New topic form (pre-formated topic)
Post by: technodragon73 on May 12, 2006, 03:18:28 AM
Actually you're right...if you set the board that the form posts is to allow guests then they won't have to register.
Title: Re: Article - New topic form (pre-formated topic)
Post by: DrakeBrimstone on May 12, 2006, 06:53:02 AM
Here is what I have so far, includes required field validation


<?php


class ftfFormField{
public 
$DisplayText;
public 
$Type;
public 
$DefaultValue;
public 
$PostText;
public 
$Required;
public 
$SizeW;
public 
$SizeH;


public function 
__construct($DisplayText$Type$DefaultValue$PostText$SizeW$SizeH$Required=0){
$this->DisplayText $DisplayText;
$this->Type $Type;
$this->DefaultValue $DefaultValue;
$this->PostText $PostText;
$this->SizeW $SizeW;
$this->SizeH $SizeH;
$this->Required $Required;


}

public function 
DisplayField($id){


if(
$this->Type==1){

echo 
"<tr><td>\n";
if(
$this->Required)
{
echo 
"*";
}
echo 
$this->DisplayText;
echo 
"</td><td>\n";
echo 
"<input name='f";
echo 
$id;
echo 
"' pText='";
echo 
$this->PostText;
echo 
"' bReq=";
echo 
$this->Required;
echo 
" type='text' value='";
echo 
$this->DefaultValue;
echo 
"' size='";
echo (string) 
$this->SizeW;
echo 
"'>\n";

}
elseif(
$this->Type==2){

echo 
"<tr><td colspan=2>\n";
if(
$this->Required)
{
echo 
"*";
}
echo 
$this->DisplayText;
echo 
"</td>";
echo 
"</tr><tr><td colspan=2>\n";
echo 
"<textarea name='f";
echo 
$id;
echo 
"' pText='";
echo 
$this->PostText;
echo 
"' bReq=";
echo 
$this->Required;
echo 
" cols='";
echo (string) 
$this->SizeW;
echo 
"' rows='";
echo (string) 
$this->SizeH;
echo 
"'>";
echo 
$this->DefaultValue;
echo 
"</textarea>\n";
}
elseif(
$this->Type==3){

echo 
"<tr><td colspan=2>\n";
if(
$this->Required)
{
echo 
"*";
}
echo 
$this->DisplayText;
echo 
"\n<input name='f";
echo 
$id;
echo 
"' pText='";
echo 
$this->PostText;
echo 
"' bReq=";
echo 
$this->Required;
echo 
" type='radio' value='Yes'";

if(
$this->DefaultValue=="Yes"){
echo 
" checked";
}

echo 
">Yes <input name='f";
echo 
$id;
echo 
"' type='radio' value='No'";

if(
$this->DefaultValue=="No"){
echo 
" checked";
}

echo 
">No\n";
}
echo 
"</td></tr>\n";

}


}





$ftfFieldArray = array();

//Copy and paste the line below (uncomment it) and fill it out for each field you wish to have.
//You must enter numbers starting with 0 in the [] sequentualy as you wish it to appear on the page. Do not skip numbers.
//The first value in the is for the displayed text on the form
//The second value, a number, is the vield type (1=text, 2=textarea, 3= Yes/No)
//The third value is the default value, text for types 1&2 and "Yes" or "No" for type 3
//The fourth value is the text you wish to display in the post.
//The fith value is the width of the textbox or textarea in pixlies. Leave 0 for type 3.
//The sixth value is the hight of a textarea in rows. Leave 0 for types 1 and 3.
//The seventh, and last, states if the field is required (1 for required, 0 for not required)

//--------------------------------------------------
//$ftfFieldArray[] = new ftfFormField("",1,"","",0,0,1);
//--------------------------------------------------

//--------------------------------------------------
//This is the ONLY area you edit, insert the field informaton below
//--------------------------------------------------



//--------------------------------------------------
//End Field Information
//--------------------------------------------------

//--------------------------------------------------
//enter the array number for the field that is to be used for the subject
//--------------------------------------------------
$ftfSubjectField 4;
//--------------------------------------------------

//--------------------------------------------------
//enter the correct url and board id below. Example provided.
//--------------------------------------------------
$ftfURL "http://www.domain.com/forums/index.php?action=post;board=29.0";
//--------------------------------------------------

//--------------------------------------------------
//This ends the field definition area, do not modify below this point
//--------------------------------------------------




//--------------------------------------------------

echo "<form name='frmFill'>";
echo 
"<div align='center'>";
echo 
"<table>";
$ftfid=0;
foreach (
$ftfFieldArray as $ftfField)
{
$ftfField->DisplayField($ftfid);
$ftfid=$ftfid+1;
}


echo 
"</table>";
echo 
"</div>";
echo 
"</form>";

?>


<!--form action='<?php echo $ftfURL?>' method='post' name='postmodify' target='_parent' id='postmodify' style='margin: 0;'-->
<form name='postmodify'>
<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'], '' />

<div align='center'>
<input type='button' name='btnSubmit' value='Apply' onclick='CompileForm()'>
</div>

</form>



<script>


function CompileForm()
{

if (!(CheckRequired())) return;

strCompiled="";

<?php
echo "\n\n\n\n";
echo 
"document.postmodify.subject.value=document.frmFill.f";
echo 
$ftfSubjectField;
echo 
".value;\n";

$ftfid=0;
foreach (
$ftfFieldArray as $ftfField)
{
echo 
"strCompiled=strCompiled+document.frmFill.f";
echo 
$ftfid;

if (
$ftfField->Type==3)
{
echo 
"[0]";
}

echo 
".pText+";
if (
$ftfField->Type==2)
{
echo 
"'\\n'+";
}
echo 
"document.frmFill.f";

echo 
$ftfid;

if (
$ftfField->Type==3)
{
echo 
"[0]";
}

echo 
".value+'\\n';\n";

$ftfid=$ftfid+1;
}
?>




document.postmodify.message.value=strCompiled;

alert(document.postmodify.subject.value+'\n\n'+document.postmodify.message.value);
//alert('test');
//document.postmodify.submit();


}



function CheckRequired()
{
<?php
$ftfid
=0;
$ftffid=0;
foreach (
$ftfFieldArray as $ftfField)
{
if (
$ftfField->Required)
{
if (
$ftfField->Type==1)
{
echo 
"if (document.frmFill.f";
echo 
$ftfid;
echo 
".value=='')\n{\nalert('Please Fill out All Required Fields1');\ndocument.frmFill.elements[";
echo 
$ftffid;
echo 
"].focus();\nreturn 0;\n}\n";
}
elseif (
$ftfField->Type==2)
{
echo 
"if (document.frmFill.f";
echo 
$ftfid;
echo 
".value=='')\n{\nalert('Please Fill out All Required Fields2');\ndocument.frmFill.elements[";
echo 
$ftffid;
echo 
"].focus();\nreturn 0;\n}\n";
}
elseif (
$ftfField->Type==3)
{
echo 
"if (!(document.frmFill.f";
echo 
$ftfid;
echo 
"[0].checked))\n{\n";
echo 
"if (!(document.frmFill.f";
echo 
$ftfid;
echo 
"[1].checked))\n{\n";
echo 
"\nalert('Please Fill out All Required Fields3');\ndocument.frmFill.elements[";
echo 
$ftffid;
echo 
"].focus();\nreturn 0;\n}\n}\n";
}
}

if (
$ftfField->Type==3)
{
$ftffid=$ftffid+1;
}

$ftffid=$ftffid+1;
$ftfid=$ftfid+1;

}


?>


return true;
}




</script>





An example that displays the results in an alert box can be found at the following url

*edit* fully modified now for variable compatability, took me less time thing I thought.

http://www.drakebrimstone.com/testform/testphpform.php

Title: Re: Article - New topic form (pre-formated topic)
Post by: londonhogfan on May 12, 2006, 04:39:46 PM
this is great!

I started this topic about 3 weeks ago and the TP community did an awesome job working it out.

Thanks everyone.

now if someone could make a roster page :D (http://www.tinyportal.net/smf/index.php?topic=3931.msg38299#msg38299)
Title: Re: Article - New topic form (pre-formated topic)
Post by: examino on May 24, 2006, 01:16:56 PM
Quote from: MyFSI on April 28, 2006, 08:33:49 PM
Write this in a PHP article:


echo'
<div align="center">
<form action="http://www.the-rota.com/index.php?action=post2;board=5" method="post" name="postmodify" id="postmodify" style="margin: 0;">
Your Gaming Alias - dd/mm/yyyy<br>
<input type="text" name="subject" tabindex="1" size="80" maxlength="80" />
<br><br>
<input name="icon" id="icon" value="xx" type="hidden">
<textarea class="editor" name="message" rows="25" cols="60" tabindex="2">

In Game Alias:

First Name:

Email Address:

XFire Name:

Location(State or Country):

Age:

Invited By: (If any)

Leagues Played In: (If any)

Have you ever been an admin in another clan?:

Why do you want to join ~RoTa~?:

Have you read and understand the Code of Conduct?:

Do you understand our member/recruit process and requirements?:

Are you willing to uphold these at ALL times?:

Any other comments or suggestions?:

</textarea><br>

<input type="submit" name="post" value="Submit" tabindex="3">
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>
</div>';


notice the added line:
<input type="hidden" name="sc" value="', $context['session_id'], '" />
this will include your session id so it won't give you that error again.

Is there anyway to use this script or a modified version of it in order to get users inpun in my EMAIL? Also I want to display as an article perhaps, a thank you page... Is this possible...somehow?
Title: Re: Article - New topic form (pre-formated topic)
Post by: technodragon73 on May 24, 2006, 02:04:46 PM
for email you would just use a normal form. the purpose of this was to make it so you did not have to use the traditional email method.
Title: Re: Article - New topic form (pre-formated topic)
Post by: examino on May 24, 2006, 02:10:33 PM
Can you please tell me how? Noob Here!  :uglystupid2:
Title: Re: Article - New topic form (pre-formated topic)
Post by: technodragon73 on May 24, 2006, 02:40:23 PM
just do a search on the internet for creating html forms...there are loads of tutotrials as well as automated form generators available.  Even most html programs will guide you through creating a form...
Title: Re: Article - New topic form (pre-formated topic)
Post by: samson on November 12, 2006, 03:47:12 AM
could someone please take a quick look and let me know what I am doing wrong. I am trying to use the last post from DrakeBrimstone

//You must enter numbers starting with 0 in the [] sequentualy as you wish it to appear on the page. Do not skip numbers.
// 1 The first value in the is for the displayed text on the form
// 2 The second value, a number, is the vield type (1=text, 2=textarea, 3= Yes/No)
// 3 The third value is the default value, text for types 1&2 and "Yes" or "No" for type 3
// 4 The fourth value is the text you wish to display in the post.
// 5 The fith value is the width of the textbox or textarea in pixlies. Leave 0 for type 3.
// 6 The sixth value is the hight of a textarea in rows. Leave 0 for types 1 and 3.
// 7 The seventh, and last, states if the field is required (1 for required, 0 for not required)

//--------------------------------------------------
//$ftfFieldArray[] = new ftfFormField("",1,"","",0,0,1);
//--------------------------------------------------

//--------------------------------------------------
//This is the ONLY area you edit, insert the field informaton below
//--------------------------------------------------

$ftfFieldArray[0] = new ftfFormField("Real first name:",1,"text","Real first name:",20,1,1);

//--------------------------------------------------
//End Field Information


everytime I hit submit I get an error window

you can give it a try here
http://www.ligs.us/smf3/index.php?page=52 (http://www.ligs.us/smf3/index.php?page=52)

Im sure im doing somthing wrong any help would be appreiciated
Title: Re: Article - New topic form (pre-formated topic)
Post by: Flex on November 23, 2006, 11:11:52 AM
So, Can someone please post the whole code, not just bits and pieces?. I'd like to use this but I have no idea of what I'm doing. Thanks.
Title: Re: Article - New topic form (pre-formated topic)
Post by: animecosmo on February 14, 2007, 03:52:59 AM
When I use the original code posted, no changes what so ever (other than to make it post in my own forum), it works just fine. However, if I change the fields in it to read:

Quote
BASICS
Character Name:
Gender:
Birthdate:
Ancestry:

* Ancestry type can be pureblood (both parents are wizards), Muggle-born (neither parent is a wizard; you must choose this type for your first character if you do not know much about the Harry Potter books), or half-blood (one wizard parent, one non-wizard parent).

FAMILY
Names of parents/guardians (MUST have at least one adult parent/guardian):

Names of siblings (optional):

Description (physical and personality) of parents/guardians:

Description (physical and personality) of siblings (optional):

Other (anything else noteworthy about the family):

PHYSICAL ATTRIBUTES
Hair Colour:
Hair Style/Type:
Skin Tone:
Eye Colour:
Height (Short, tall, average, a bit tall, etc.):
Build (Thin, athletic, fat, etc.):
Other (Anything else you want to describe, optional):

PERSONALITY
Describe your character's personality in as much detail as you can.

OTHER ATTRIBUTES
Likes:
Dislike:
Fears:
Hobbies/Interests:
Goals/Dream Job (if known yet):
Best Subject:
Worst Subject:
Other (anything else noteworthy, optional):

Pet (Owl, cat, rat, toad, fox, small snake, raven):

* For the subjects, if it is a first year student, put what they are going to be best in (since they haven't started school yet).

ABILITIES
For these abilities, choose very poor, poor, average, above average, or excellent. You have 15 total points to spend in these areas. See the chart below for adding or subracting points from your total.

Dismal: +3 points
Very Poor: +2 points
Poor: +1 point
Average: 0 points
Good: -1 point
Very Good: -2 points
Exceptional: -3 points

Memorization Ability (Ability to read/hear/see something and remember it):
Cunning (How tricky and manipulative are you?):
Problem Solving:
Concentration (Can you avoid being distracted?):
Creativity:

Bravery:
Self-Confidence:
Magical Ability (How powerful a wizard/witch):
Future Seeing Ability:

Speed (How fast are you, athletically?):
Agility (Can you dodge and move easily?):
Strength (How strong are you?):
Accuracy/Aim (Applies to spells and physical objects):

Charm (Can you talk your way into/out of things?):
Popularity (How well are you liked):
Fame (How famous are you?):
Tact (Can you say things without offending others?):
Looks:

Sneaking (How good are you at hiding, sneaking, etc.?):
Practical Joking:
Mischief (Are you good at getting away with mischief?):

It gives me an error:

Parse error: syntax error, unexpected '<' in /home/(name edited out)/public_html/Forum/Sources/Load.php(1768) : eval()'d code(231) : eval()'d code on line 1

Every other version of the code posted gives an error as well. I tried taking out the things with an astrisk, too. Any ideas?
Title: Re: Article - New topic form (pre-formated topic)
Post by: Noam on March 21, 2007, 01:39:51 AM
Late to the party, I know, but in case people were looking for some other examples, here's one for our WoW guild. We needed some longer text entry areas, and believe me, getting textareas on the form was a pain:

Made a php article titled "Apply to FOO" and linked it off the front page, contents follows:


/*
Noam's Notes:
0. Backslash every apostrophe in the big echo statement below.
1. Never, ever put in a closing textarea tag literally. It will screw up the article editor somethin' fierce. Use '</text'.'area>' instead.
*/
echo '
<form name="application">
    <p>1. Say hello and tell us a little bit about yourself: this is the only in-character question in this application. If you\'re new to RP don\'t stress over this. Just a quick hello and who you are.<br />
    Character Name: <input type="text" name="characterName" size="40"><br>
    Character Introduction:<br>
    <textarea rows="10" cols="80" name="characterIntro"></text'.'area></p>
    <p>2. Is this your main character and what level are you?<br />
    <input type="radio" name="isMain" value="Yes" />Yes, this is my main character.<br />
    <input type="radio" checked="checked" name="isMain" value="No" />No, this is not my main character.<br />
    <input maxlength="2" size="3" name="characterLevel" type="text" />Level</p>
    <p>3. Please list the guilds on BAR you have been a member of. If you\'re a transfer, please list the server and guilds you have transferred from and the reason you transferred.<br />
    <textarea rows="10" cols="80" name="priorGuilds"></text'.'area></p>
    <p>4. Do you have any Alternative Characters you wish to bring into the guild? If yes, what are their names and levels?<br />
    <textarea rows="10" cols="80" name="altCharacters"></text'.'area></p>
    <p>5. Have you ever had a character enrolled in FOO or BAZ in the past? If yes, what were your reasons for leaving, and what was the name of the character you were enrolled under?<br />
    <textarea rows="10" cols="80" name="priorFooCharacters"></text'.'area></p>
    <p>6. What is it that you are looking for in and want from a guild?<br />
    <textarea rows="10" cols="80" name="whatLookingFor"></text'.'area></p>
    <p>7. What is it you bring to the guild? (trade skills, etc. Anything else you think is pertinent)<br />
    <textarea rows="10" cols="80" name="whatBringing"></text'.'area></p>
    <p>8. What is your RP (Role Playing) experience?<br />
    <textarea rows="10" cols="80" name="rpExperience"></text'.'area></p>
    <p>9. How long have you played WoW?<br />
    <textarea rows="10" cols="80" name="howLongPlayed"></text'.'area></p>
    <p>10. Have you created a history or back story for you character? (not a requirement; see the Conduct)<br />
    <input type="radio" name="hasBackstory" value="Yes" />Yes, I have a backstory.<br />
    <input type="radio" checked="checked" name="hasBackstory" value="No" />No, I have no backstory.</p>
    <p>Do you understand this must comply with WoW\'s Azerothian Lore as well as FOO\'s Lore and Conduct?<br />
    <input type="radio" name="understandLore" value="Yes" />Yes, I understand.<br />
    <input type="radio" checked="checked" name="understandLore" value="No" />No, I don\'t understand.</p>
    <p>How do you feel about advice or comments on your character\'s history/backstory?<br />
    <textarea rows="10" cols="80" name="feelAboutComments"></text'.'area></p>
    <p>11. Have you read The Conduct of FOO and agree to abide by these guidelines and rules?<br />
    <input type="radio" name="hasReadConduct" value="Yes" />Yes, I\'ve read it and I agree.<br />
    <input type="radio" checked="checked" name="hasReadConduct" value="No" />No. I\'ve either not read it, or don\'t agree.</p>
    <p>12. Do you have any comments or questions regarding joining or being a member of FOO?<br />
    <textarea rows="10" cols="80" name="commentsAndQuestions"></text'.'area></p>
    <p>13. Where did you hear of FOO?<br />
    <textarea rows="10" cols="80" name="whereYouHeard"></text'.'area></p>
</form>
<p>Thank you for your time in filling this out and reading the Conduct. We look forward to meeting you in game.</p>

<form action="http://SERVERNAME/index.php?action=post;board=TARGETBOARD" method="post" name="postmodify" id="postmodify" style="margin: 0;">
<input type="hidden" name="subject">
<input type="hidden" name="icon" id="icon" value="xx">
<input type="hidden" name="message">
<input type="hidden" name="sc" value="'.$context['session_id'].'">

<script>
function CompileForm()
{

  characterName=document.application.characterName.value;
  characterIntro=document.application.characterIntro.value;

  for (i=0;i<document.application.isMain.length;i++){
    if (document.application.isMain[i].checked==true){
      theone=i; break;
    }
  }
  if (theone==0) { isMain="Yes"; } else { isMain="No"; }

  characterLevel=document.application.characterLevel.value;
  priorGuilds=document.application.priorGuilds.value;
  altCharacters=document.application.altCharacters.value;
  priorFooCharacters=document.application.priorFooCharacters.value;
  whatLookingFor=document.application.whatLookingFor.value;
  whatBringing=document.application.whatBringing.value;
  rpExperience=document.application.rpExperience.value;
  howLongPlayed=document.application.howLongPlayed.value;

  for (i=0;i<document.application.hasBackstory.length;i++){
    if (document.application.hasBackstory[i].checked==true){
      theone=i; break;
    }
  }
  if (theone==0) { hasBackstory="Yes"; } else { hasBackstory="No"; }

  for (i=0;i<document.application.understandLore.length;i++){
    if (document.application.understandLore[i].checked==true){
      theone=i; break;
    }
  }
  if (theone==0) { understandLore="Yes"; } else { understandLore="No"; }

  feelAboutComments=document.application.feelAboutComments.value;

  for (i=0;i<document.application.hasReadConduct.length;i++){
    if (document.application.hasReadConduct[i].checked==true){
      theone=i; break;
    }
  }
  if (theone==0) { hasReadConduct="Yes"; } else { hasReadConduct="No"; }

  commentsAndQuestions=document.application.commentsAndQuestions.value;
  whereYouHeard=document.application.whereYouHeard.value;

  strCompiled=
    "[b]Character name:[/b] " + characterName + "\n\n" +
    "[b]Character introduction:[/b]\n" + characterIntro + "\n\n" +
    "[b]Main character?[/b] " + isMain + "\n" +
    "Level " + characterLevel + "\n\n" +
    "[b]Prior guilds:[/b]\n" + priorGuilds + "\n\n" +
    "[b]Alt characters:[/b]\n" + altCharacters + "\n\n" +
    "[b]Prior FOO characters:[/b]\n" + priorFooCharacters + "\n\n" +
    "[b]What you\'re looking for:[/b]\n" + whatLookingFor + "\n\n" +
    "[b]What you\'re bringing:[/b]\n"  + whatBringing + "\n\n" +
    "[b]RP experience:[/b]\n" + rpExperience + "\n\n" +
    "[b]How long you\'ve played WoW:[/b]\n" + howLongPlayed + "\n\n" +
    "[b]Has a backstory:[/b] " + hasBackstory + "\n" +
    "[b]Understands compliance with Lore:[/b] " + understandLore + "\n\n" +
    "[b]Feels about comments on backstory:[/b] " + feelAboutComments + "\n\n" +
    "[b]Has read conduct and agrees:[/b] " + hasReadConduct + "\n" +
    "[b]Comments/questions:[/b]\n" + commentsAndQuestions + "\n\n" +
    "[b]Where you heard about FOO:[/b]\n" + whereYouHeard;
 
  document.postmodify.subject.value="New Member Application: "+characterName;
  document.postmodify.message.value=strCompiled;
 
  document.postmodify.submit();
}
</script>

Click the button below, and you\'ll see a pre-formatted post on the member applications board, where you will still need to hit the Post button to actually apply.<br>
<input type="button" name="btnSubmit" value="Submit Application" onclick="CompileForm()">
</form>
';

Title: Re: Article - New topic form (pre-formated topic)
Post by: Thurnok on March 22, 2007, 03:25:11 AM
You will find that breaking up the closing TEXTAREA tag such as:

'... other stuff in echo statement... </text'.'area> ... more stuff';


will not be quite sufficient.  Go into your article again, and find your closing TEXTAREA tag.  It will probably look like: </text> the way you currently implimented it.  It's a peculiarity.

Instead, here's a way that works 100%:

$ta_tag = 'textarea';
// open textarea, put in stuff, close textarea
echo '<'.$ta_tag.'> ... stuff here... blah blah... </'.$ta_tag.'> ... more stuff';

Title: Re: Article - New topic form (pre-formated topic)
Post by: Noam on March 24, 2007, 12:58:11 AM
Looks like it worked. Can't find any instance of </text> in the page it generated. Lots of </textarea> instances, though. I'm not sure what might cause it to insert a > into the middle of something that should be equivalent to:
echo '<h'.'r>'
So where did you see what you describe?
Title: Re: Article - New topic form (pre-formated topic)
Post by: Thurnok on March 25, 2007, 08:15:55 AM
It's simply a peculiarity that can happen under various versions of php/mysql and TP/SMF.  If it works for you great, if not, I simply provided one that doesn't show the peculiarity on systems/configs that do in the other case.
Title: Re: Article - New topic form (pre-formated topic)
Post by: Arkanthos on March 27, 2007, 09:27:33 AM
I seem to be having some issues with this. The form itself displays on the page perfectly, just as I made it, unfortunately when I go to click the submit button, nothing happens. And I mean nothing... no page load, no transmit, nothing...


/*
Noam's Notes:
0. Backslash every apostrophe in the big echo statement below.
1. Never, ever put in a closing textarea tag literally. It will screw up the article editor somethin' fierce. Use '</text'.'area>' instead.
*/
echo '
<p><b>Recruiting Requirements:</b><br /><br />

<p>All of these requirements must be fulfilled before applying, if they are not then your application will be deleted and any future applications will not be taken into consideration until the requirements are met.
<br /><br />
1.) Your character must be level 70 in order to apply, if you have not reached that level please do so before applying.<br />
2.) You do not need to have the Karazhan key, however, if you have not completed the key, please begin the quests immediately.<br />
3.) No previous raiding experience is required, however, it is highly desirable.<br />
4.) No AR gear set is required, however, you need to be prepared to acquire one as soon as possible.<br />
5.) You must have CT_RaidAssist, CT_RABossMods, and Ventrilo installed, these add-ons are required on all guild raids and play a vital roles in raid command and control.<br />
6.) There is no minimum age requirement, however maturity is a must, we are a very friendly group of people, however we do like to poke fun at each other quite often and vent chat can become slightly mature rated at times; if you are easily offended then Tyrænny might not be for you.<br /><br />
<p>Recruiting Procedure:<br /><br />

<p><b>Please follow these steps after submitting an application.</b><br /><br />

1.) The guild officers will review your application and determine if there is an opening in for your class.<br />
2.) Please wait for us to contact you in-game or via the contact information that you provided in your forum account regarding whether there is a need for your class.<br />
3.) If there is indeed an opening for your class, then a date for a trial run will be set up.<br />
4.) Once the trial run is completed, the guild officers will confer and decide whether to invite you into the guild.<br /><br />

<p><b>Guild Application:</b><br />
<form name="application">
    <p>Character Name:
      <input type="text" name="characterName" size="40">
      <br />
    Class:
    <input type="text" name="characterLevel" size="2">
    <br />
    Spec:           
    <input type="text" name="characterSpec1" size="2">
    -
    <input type="text" name="characterSpec2" size="2">
    -
    <input type="text" name="characterSpec3" size="2">
    <br />
    Unbuffed Arcane Resistance (Ar without auras, buffs or potions):
    <input type="text" name="charactterResistanceAR" size="3">
    <br />
    WoW Armory Link:
    <input type="text" name="characterArmory" size="40"><br />
Age: <input type="text" name="playerAge" size=2 /><br />
Occupation (if applicable): <input type="Text" name="playerOccupation" size="40" />
    <br />
      <br />
      <b>Completed Azeroth Instance Keys:</b><br />
      <br />
    Ubrs (Seal of Ascension):<br />
      <input type="radio" name="keysUBRS" value="Yes" />
      Yes, I have rmy UBRS key.<br />
      <input type="radio" checked="checked" name="keysUBRS" value="No" />
      No, I no I don\'t have my UBRS key.<br />
      Molten Core Attunement:<br />
      <input type="radio" name="keysMC" value="Yes" />
      Yes, I am MC attuned.<br />
      <input type="radio" checked="checked" name="keysMC" value="No" />
      No, I am not MC attuned.<br />
  Eternal Quintescence: <br />
      <input type="radio" name="keysEQ" value="Yes" />
      Yes, I have my Eternal Quintescence.<br />
      <input type="radio" checked="checked" name="keysEQ" value="No" />
      No, I don\'t have my Eternal Quintescence.<br />
      Onyxia Key(Drakesfire Amulet):<br />
      <input type="radio" name="keysOnyxia" value="Yes" />
      Yes, I have my Drakesfire Amulet.<br />
      <input type="radio" checked="checked" name="keysOnyxia" value="No" />
      No, I do not have my Drakesfire Amulet.
    <p><b>Completed Outlands Keys</b><br /><br />
      Hellfire Citadel:<br />
      <input type="radio" name="keysHC" value="Yes" />
      Yes, I have my Hellfire Citadel Key.<br />
      <input type="radio" checked="checked" name="keysOnyxia" value="No" />
      No, I do not have my Hellfire Citadel Key.<br />
  Reservoir Key:<br />
      <input type="radio" name="keysResevoir" value="Yes" />
      Yes, I have my Reservoir Key.<br />
      <input type="radio" checked="checked" name="keysResevoir" value="No" />
      No, I do not have my Reservoir Key.<br />
  Auchenai Crypts:<br />
      <input type="radio" name="keysAcuhenai" value="Yes" />
      Yes, I have my Auchenai Crypts key.<br />
      <input type="radio" checked="checked" name="keysAuchenai" value="No" />
      No, I do not have my Auchenai Crypts key.<br />
  Tempest Key:<br />
      <input type="radio" name="keysTempest" value="Yes" />
      Yes, I have my Tempest Key.<br />
      <input type="radio" checked="checked" name="keysTempest" value="No" />
      No, I do not have my Tempest Key.<br />
  Caverns of Time:<br />
      <input type="radio" name="keysCOT" value="Yes" />
      Yes, I have my Caverns of Time key.<br />
      <input type="radio" checked="checked" name="keysCOT" value="No" />
      No, I do not have my Caverns of Time key.<br />
  Arcatraz Key:<br />
      <input type="radio" name="keysArcatraz" value="Yes" />
      Yes, I have my Arcatraz Key.<br />
      <input type="radio" checked="checked" name="keysArcatraz" value="No" />
      No, I do not have my Arcatraz Key.<br />
  The Mark of Vashj:<br />
      <input type="radio" name="keysEye" value="Yes" />
      Yes, I have my Mark of Vashj.<br />
      <input type="radio" checked="checked" name="keysEye" value="No" />
      No, I do not have my Mark of Vashj.<br />
  Shattered Halls:<br />
      <input type="radio" name="keysHalls" value="Yes" />
      Yes, I have my Shattered Halls key.<br />
      <input type="radio" checked="checked" name="keysHalls" value="No" />
      No, I do not have my Shattered Halls key.<br />
  Karazhan:<br />
      <input type="radio" name="keysKarazhan" value="Yes" />
      Yes, I have my Karazhan key.<br />
      <input type="radio" checked="checked" name="keysKarazhan" value="No" />
      No, I do not have my Karazhan key.<br />
      Shadow Labyrinth:<br />
      <input type="radio" name="keysShadowLab" value="Yes" />
      Yes, I have my Shadow Labyrinth key.<br />
      <input type="radio" checked="checked" name="keysShadowLab" value="No" />
      No, I do not have my Shadow Labyrinth key. 
  <br /><br />
  Please list any other MMORPG gaming experience that you have:<br />
  <textarea rows="10" cols="80" name="otherMMORPG"></text'.'area>
  <br />
  Please state any previous WoW raiding experience that you have:<br />
  <textarea rows="10" cols="80" name="otherRaiding"></text'.'area>
  <br />
  Please list any other WoW guilds that you have been a part of and why you are no longer a part of them:<br />
  <textarea rows="10" cols="80" name="otherGuilds"></text'.'area>
  <br />
  Please state what you are looking for in a guild:<br />
  <textarea rows="10" cols="80" name="lookingFor"></text'.'area>
  <br />
  Please state why you are interested in Tyrænny:<br />
  <textarea rows="10" cols="80" name="interestSource"></text'.'area>
  <br />
  Please state how often you plan to raid and list the days and times that you are free to raid on; also, please list which days you are not able to raid on:<br />
  <textarea rows="10" cols="80" name="daysAvailable"></text'.'area>
  <br />
 
  </form>
<p>If at any point during the application process we determine that you were untruthful, your application will be deleted.

Thank you for your time, and best of luck to you.</p>

<form action="http://www.tyraenny.net/index.php?action=post;board=16.0" method="post" name="postmodify" id="postmodify" style="margin: 0;">
<input type="hidden" name="subject">
<input type="hidden" name="icon" id="icon" value="xx">
<input type="hidden" name="message">
<input type="hidden" name="sc" value="'.$context['session_id'].'">

<script>
function CompileForm()
{

  characterName=document.application.characterName.value;
  characterLevel=document.application.characterLevel.value;
  characterSpec1=document.application.characterSpec1.value;
  characterSpec2=document.application.characterSpec2.value;
  characterSpec3=document.application.characterSpec3.value;
  characterResistanceAR=document.application.characterResistanceAR.value;
  characterArmory=document.application.characterArmory.value;
  playerAge=document.application.playerAge.value;
  playerOccupation=document.application.playerOccupation.value;

  for(i=0,i<document.application.keysUBRS.length;c++)
     {
      if(document.application.keysUBRS[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysUBRS="yes";} else{keysUBRS="no";}

  for(i=0,i<document.application.keysMC.length;c++)
     {
      if(document.application.keysMC[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysMC="yes";} else{keysMC="no";}

  for(i=0,i<document.application.keysEQ.length;c++)
     {
      if(document.application.keysEQ[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysEQ="yes";} else{keysEQ="no";}

  for(i=0,i<document.application.keysOnyxia.length;c++)
     {
      if(document.application.keysOnyxia[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysOnyxia="yes";} else{keysOnyxia="no";}

  for(i=0,i<document.application.keysResevoir.length;c++)
     {
      if(document.application.keysResevoir[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysResevoir="yes";} else{keysResevoir="no";}

  for(i=0,i<document.application.keysAuchenai.length;c++)
     {
      if(document.application.keysAuchenai[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysAuchenai="yes";} else{keysAuchenai="no";}

  for(i=0,i<document.application.keysTempest.length;c++)
     {
      if(document.application.keysTempest[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysTempest="yes";} else{keysTempest="no";}

  for(i=0,i<document.application.keysCOT.length;c++)
     {
      if(document.application.keysCOT[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysCOT="yes";} else{keysCOT="no";}

  for(i=0,i<document.application.keysArcatraz.length;c++)
     {
      if(document.application.keysArcatraz[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysArcatraz="yes";} else{keysArcatraz="no";}

  for(i=0,i<document.application.keysEye.length;c++)
     {
      if(document.application.keysEye[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysEye="yes";} else{keysEye="no";}

  for(i=0,i<document.application.keysKarazhan.length;c++)
     {
      if(document.application.keysKarazhan[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysKarazhan="yes";} else{keysKarazhan="no";}

  for(i=0,i<document.application.keysShadowLab.length;c++)
     {
      if(document.application.keysShadowLab[i].checked==true)
        {
           theone=i; break;
        }
     }
  if(theone==0){keysShadowLab="yes";} else{keysShadowLab="no";}

  otherMMORPG=document.application.otherMMORPG.value;
  otherRaiding=document.application.otherRaiding.value;
  otherGuilds=document.application.otherGuilds.value;
  lookingFor=document.application.lookingFor.value;
  interestSource=document.application.interestSource.value;
  daysAvailable=document.application.daysAvailable.value;

  strCompiled=
    "[b]Character\'s Name:[/b] " + characterName + "\n\n" +
    "[b]Character\'s Level:[/b] " + characterLevel + "\n\n" +
    "[b]Character\'s Spec:[/b] " + characterSpec1 + "-" + characterSpec2 + "-" +characterSpec3 + "\n\n" +
    "[b]Character\'s Arcane Resistance:[/b] " + characterResistanceAR + "\n\n" +
    "[b]Character\'s Armory URL:[/b] " + characterArmory + "\n\n" +
    "[b]Character\'s Occupation (if applicable):[/b] " + characterOccupation + "\n\n" +
    "[b][u]Character\'s Azeroth Keys:[/u][/b] " +"\n\n\n" +
    "UBRS: " + keysUBRS + "\n" +
    "MC: " + keysMC + "\n" +
    "Eternal Quintescence: " + keysEQ + "\n" +
    "Onyxia: " + keysOnyxia + "\n\n" +
    "[b][u]Outlands Keys:[/u][/b]: "  + "\n\n" +
    "Coilfang Resevoir: " + keysResevoir + "\n" +
    "Acheunai Crypts: " + keysAcheunai + "\n" +
    "Tempest: " + keysTempest + "\n" +
    "Caverns of Time: " + keysCOT + "\n" +
    "The Arcatraz: " + keysArcatraz + "\n" +
    "The Mark of Vashj: " + keysEye + "\n" +
    "Karazhan: " + keysKarazhan + "\n" +
    "Shadow Labs: " + keysShadowLabs + "\n\n" +
    "[b][u]Other information[/u][/b]: " + "\n\n" +
    "Other MMORPG Experience:\n" + otherMMORPG + "\n\n" +
    "Previous Raiding Experience:\n" + otherRaiding + "\n\n" +
    "Previous Guilds:\n" + otherGuilds + "\n\n" +
    "What I\'m looking for in Tyraenny:\n" + lookingFor + "\n\n" +
    "How I heard about Tyraenny:\n" + interestSource + "\n\n" +
    "My raiding availability:\n" + daysAvailable;
 
  document.postmodify.subject.value="New Member Application: "+characterName;
  document.postmodify.message.value=strCompiled;
 
  document.postmodify.submit();
}
</script>

Click the button below, and you\'ll see a pre-formatted post on the member applications board, where you will still need to hit the Post button to actually apply.<br />
<input type="button" name="btnSubmit" value="Submit Application" onclick="CompileForm()">
</form>
';


I've checked the things that were obvious to me, and combed through all of the code but can't seem to find my error.
Title: Re: Article - New topic form (pre-formated topic)
Post by: Arkanthos on April 01, 2007, 11:43:48 PM
Anyone have any ideas on what could be going wrong? I've tried working with the code and for some reason still can't get it to work.
Title: Re: Article - New topic form (pre-formated topic)
Post by: Noam on April 03, 2007, 12:25:14 AM
Ideas:

1. If you have Firefox, learn to love the Error Console (Tools / Error Console). You may find some JavaScript errors with it. If you don't have Firefox, get it, or get something else that can debug JavaScript.

2. Simplify. My first form for our site (>99% derived from the previous code here) had just a couple of text inputs: no textareas, no radio buttons, etc. Make sure you can move just a couple of bits of data from the visible form to the hidden form to the preformatted post before jumping in with the whole thing. Once you've got a few fields, add a few more, and retest. Repeat until the whole form is working. If it works in the simpler cases, but fails as soon as you add code block X, then it'll help narrow down where the problem would be.

3. You've got some typos in your radio fields for instance keys, including an Onyxia key where an HC key should be and inconsistent spelling for the AC keys. This isn't a syntax problem, but may cause the form to misbehave or appear to change data from one form to the next. The logic on the radio buttons I worked from assumes exactly two radio buttons for a given name.

4. These types of lines probably won't iterate properly, and you may find an entry in the Error Console accordingly:
for(i=0,i<document.application.keysUBRS.length;c++)
Can't use i for the iteration variable, and then increment c. Well, you technically can, but it won't do what you'd normally want in C, and probably won't do what you want in JavaScript. These would cause infinite loops, and maybe the browser fails them after a set period of time?
Title: Re: Article - New topic form (pre-formated topic)
Post by: Arkanthos on April 05, 2007, 05:07:25 PM
... why didn't I see that when I was looking through... I think it's something about being too close to the code.

Thanks a tun man, this has been bugging me forever, and I knew that it had to be something simple like that. I've fixed the syntax things you talked about above but hadn't updated the code here to reflect it.
Title: Re: Article - New topic form (pre-formated topic)
Post by: pinegr05 on May 29, 2007, 01:48:10 AM
Need some help with some code.  I have reduced the code to make a short form with 4 connected radio buttons.  I have been able to make every thing work except for giveing the correct results from the radio buttons.  The following is the complete code:

  /*
Noam's Notes:
0. Backslash every apostrophe in the big echo statement below.
1. Never, ever put in a closing textarea tag literally. It will screw up the article editor somethin' fierce. Use '</text'.'area>' instead.
*/
echo '
<form name="application">
    <p><font size="4" >P5 Daily Report<br /></font><br /></p>
    <p>Name: <input type="text" name="characterName" size="40"><br></p>
    <p>How did Machine run?<br /></p>
    <p><input type="radio" checked="checked" name="isMain" value="A" />"A" Shift<br />
    <input type="radio" name="isMain" value="B" />"B" Shift<br />
    <input type="radio" name="isMain" value="C" />"C" Shift<br />
    <input type="radio" name="isMain" value="D" />"D" Shift<br /></p>
    <p>General Info:<br>
    <textarea rows="10" cols="80" name="characterIntro"></text'.'area></p>
   
</form>
<p>Thank you for filling out and posting.</p>

<form action="http://www.p4.pinegrovebaptist-bayminette.org/index.php?action=post;board=6" method="post" name="postmodify" id="postmodify" style="margin: 0;">
<input type="hidden" name="subject">
<input type="hidden" name="icon" id="icon" value="xx">
<input type="hidden" name="message">
<input type="hidden" name="sc" value="'.$context['session_id'].'">

<script>
function CompileForm()
{

  characterName=document.application.characterName.value;

  for (i=0;i<document.application.isMain.length;i++){
    if (document.application.isMain[i].checked==true){theone=i; break;}
  }
  if (theone==0) { isMain="A";} else { isMain="B"; }

  characterIntro=document.application.characterIntro.value;

   

  strCompiled=
    "[b]Name:[/b] " + characterName + "\n\n" +
    "[b]Shift:[/b] " + isMain + "\n\n" +
    "[b]General Info:[/b]\n" + characterIntro + "\n\n";

  document.postmodify.subject.value="P5 Shift Report for "+characterName;
  document.postmodify.message.value=strCompiled;
 
  document.postmodify.submit();
}
</script>

<p>Select the button below, and you\'ll see a pre-formatted post on the P5 Daily Report board.  Hit the Post button to apply.<br></p>


<input type="button" name="btnSubmit" value="Submit Daily Report" onclick="CompileForm()">
</form>
';
 


The part of the code I am having problem with is the following:

for (i=0;i<document.application.isMain.length;i++){
    if (document.application.isMain[i].checked==true){theone=i; break;}
  }
  if (theone==0) { isMain="A";} else { isMain="B"; }


It will give me the A or B.  I am missing some code and can not figure out whait is needed.  I'm new to this and I am learning.

Thanks for any help.
Title: Re: Article - New topic form (pre-formated topic)
Post by: PAPABEAR on April 28, 2008, 01:38:02 PM
Quote from: Omniverse on May 09, 2006, 06:52:22 PM
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. :)


Your form works great. I have a flash form at http://www.theblackplagueonline.com/index.php?page=8 that I would love to have post the results in a forum like yours does.

I assume the code I need to edit is in my apply.xml file.

<?xml version="1.0" encoding="UTF-8"?>

<form url="apply.php"
window="_self"
method="POST"
fontname="MS Sans Serif"
width="655"
height="682"
bkcolor="0x000000"
outlinecolor="0xFF0000"
fontcolor="0x000000"
themecolor="0xC0C0C0"
fontcolor2="#FFFFFF"
bkcolor2="#000000"
includeresults="false"
emailuser="false"
reqmessage="One or More Fields are Required"
autoresponse=""
transition="0">

<hidden
name="thankyoupage"
value="http://www.theblackplagueonline.com/thanks.html"
></hidden>

<hidden
name="mailto"
value="applications;theblackplagueonline=com"
></hidden>

<hidden
name="subject"
value="Guild Application"
></hidden>

<image
image="guildapp.jpg"
x="25"
y="4"
></image>

<label
name="My Text 1"
x="32"
y="100"
w="50"
h="18"
text="Name:"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<label
name="My Text 2"
x="285"
y="102"
w="36"
h="18"
text="Age:"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<combobox
name="Age Drop Down"
x="334"
y="101"
bkcolor="0xFFFFFF"
fontcolor="0x000000"
isemail="false"
w="64"
h="20">
  <item name="17"></item>
  <item name="18"></item>
  <item name="19"></item>
  <item name="20"></item>
  <item name="21"></item>
  <item name="22"></item>
  <item name="23"></item>
  <item name="24"></item>
  <item name="25"></item>
  <item name="26"></item>
  <item name="27"></item>
  <item name="28"></item>
  <item name="29"></item>
  <item name="30"></item>
  <item name="31"></item>
  <item name="32"></item>
  <item name="33"></item>
  <item name="34"></item>
  <item name="35"></item>
  <item name="36"></item>
  <item name="37"></item>
  <item name="38"></item>
  <item name="39"></item>
  <item name="40"></item>
  <item name="41"></item>
  <item name="42"></item>
  <item name="43"></item>
  <item name="44"></item>
  <item name="45"></item>
  <item name="46"></item>
  <item name="47"></item>
  <item name="48"></item>
  <item name="49"></item>
  <item name="50"></item>
  <item name="51"></item>
  <item name="52"></item>
  <item name="53"></item>
  <item name="54"></item>
  <item name="55"></item>
  <item name="56"></item>
  <item name="57"></item>
  <item name="58"></item>
  <item name="59"></item>
  <item name="60"></item>
  <item name="61"></item>
  <item name="62"></item>
  <item name="63"></item>
  <item name="64"></item>
  <item name="65"></item>
</combobox>

<label
name="My Text 3"
x="31"
y="141"
w="127"
h="18"
text="Character Name:"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<label
name="My Text 4"
x="30"
y="180"
w="124"
h="18"
text="Character Class:"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<textinput
name="Name"
x="96"
y="100"
w="175"
h="22"
initvalue=""
bkcolor="0xFFFFFF"
  fontname="Arial"
  fontcolor="0x000000"
>
</textinput>

<textinput
name="Character Name"
x="172"
y="138"
w="175"
h="22"
initvalue=""
bkcolor="0xFFFFFF"
  fontname="Arial"
  fontcolor="0x000000"
>
</textinput>

<combobox
name="Character Class"
x="168"
y="179"
bkcolor="0xFFFFFF"
fontcolor="0x000000"
isemail="false"
w="136"
h="20">
  <item name="Select Class..."></item>
  <item name="Assassin"></item>
  <item name="Barbarian"></item>
  <item name="Bear Shaman"></item>
  <item name="Conqueror"></item>
  <item name="Dark Templar"></item>
  <item name="Demonologist"></item>
  <item name="Guardian"></item>
  <item name="Herald of Xotli"></item>
  <item name="Necromancer"></item>
  <item name="Priest of Mitra"></item>
  <item name="Ranger"></item>
  <item name="Tempest of Set"></item>
</combobox>

<label
name="My Text 5"
x="362"
y="141"
w="122"
h="18"
text="Character Race:"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<combobox
name="Character Race"
x="496"
y="140"
bkcolor="0xFFFFFF"
fontcolor="0x000000"
isemail="false"
w="135"
h="20">
  <item name="Select Race..."></item>
  <item name="Aquilonian"></item>
  <item name="Cimmerian"></item>
  <item name="Stygian"></item>
</combobox>

<label
name="My Text 6"
x="412"
y="102"
w="72"
h="18"
text="Location:"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<combobox
name="Location Drop Down"
x="495"
y="102"
bkcolor="0xFFFFFF"
fontcolor="0x000000"
isemail="false"
w="128"
h="20">
  <item name="Select Location..."></item>
  <item name="Alabama"></item>
  <item name="Alaska"></item>
  <item name="Arizona"></item>
  <item name="Arkansas"></item>
  <item name="California"></item>
  <item name="Colorado"></item>
  <item name="Connecticut"></item>
  <item name="Delaware"></item>
  <item name="Florida"></item>
  <item name="Georgia"></item>
  <item name="Hawaii"></item>
  <item name="Idaho"></item>
  <item name="Illinois"></item>
  <item name="Indiana"></item>
  <item name="Iowa"></item>
  <item name="Kansas"></item>
  <item name="Kentucky"></item>
  <item name="Louisiana"></item>
  <item name="Maine"></item>
  <item name="Maryland"></item>
  <item name="Massachusetts"></item>
  <item name="Michigan"></item>
  <item name="Minnesota"></item>
  <item name="Mississippi"></item>
  <item name="Missouri"></item>
  <item name="Montana"></item>
  <item name="Nebraska"></item>
  <item name="Nevada"></item>
  <item name="New Hampshire"></item>
  <item name="New Jersey"></item>
  <item name="New Mexico"></item>
  <item name="New York"></item>
  <item name="North Carolina"></item>
  <item name="North Dakota"></item>
  <item name="Ohio"></item>
  <item name="Oklahoma"></item>
  <item name="Oregon"></item>
  <item name="Pennsylvania"></item>
  <item name="Rhode Island"></item>
  <item name="South Carolina"></item>
  <item name="South Dakota"></item>
  <item name="Tennessee"></item>
  <item name="Texas"></item>
  <item name="Utah"></item>
  <item name="Vermont"></item>
  <item name="Virginia"></item>
  <item name="Washington"></item>
  <item name="West Virginia"></item>
  <item name="Wisconsin"></item>
  <item name="Wyoming"></item>
</combobox>

<label
name="My Text 7"
x="320"
y="180"
w="135"
h="18"
text="Character Trades:"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<textinput
name="Character Trades"
x="464"
y="179"
w="168"
h="22"
initvalue=""
bkcolor="0xFFFFFF"
  fontname="Arial"
  fontcolor="0x000000"
required="true"
>
</textinput>

<label
name="My Text 8"
x="29"
y="220"
w="317"
h="18"
text="Will you help the guild to gather resources?"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<combobox
name="gatherer"
x="360"
y="220"
bkcolor="0xFFFFFF"
fontcolor="0x000000"
isemail="false"
w="177"
h="20">
  <item name="Select One..."></item>
  <item name="I will help gather for the guild."></item>
  <item name="I will not help gather for the guild."></item>
</combobox>

<label
name="My Text 9"
x="28"
y="260"
w="595"
h="18"
text="We require voice for raids and such. Check the software you have installed below."
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<checkbox
name="Ts Check Box"
x="43"
y="288"
w="83"
h="19"
label="Teamspeak"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<checkbox
name="Vent Check Box"
x="155"
y="288"
w="60"
h="19"
label="Ventrilo"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<checkbox
name="No Comms Check Box"
x="247"
y="288"
w="136"
h="19"
label="Will install as needed"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<checkbox
name="Comms Not Needed Check Box"
x="413"
y="288"
w="114"
h="19"
label="Voice not needed"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<label
name="My Text 10"
x="24"
y="391"
w="603"
h="18"
text="Please tell us about yourself, your gaming experience, and why you want to join us."
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<textarea
name="About Myself Area"
x="28"
y="418"
w="597"
h="96"
initvalue="About me..."
wordwrap="true"
bkcolor="0xFFFFFF"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0x000000"
></textarea>

<label
name="My Text 11"
x="28"
y="530"
w="110"
h="18"
text="Email Address:"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<textinput
name="email address"
x="151"
y="527"
w="271"
h="22"
initvalue=""
bkcolor="0xFFFFFF"
  fontname="Arial"
  fontcolor="0x000000"
required="true"
emailbox="true"
>
</textinput>

<label
name="My Text 12"
x="32"
y="581"
w="603"
h="18"
text="Finally, we would like to thank you for your interest in our guild. We will review your"
  fontname="Arial Black"
  fontcolor="0xFFFFFF"
  fontsize="13"
></label>

<label
name="My Text 13"
x="31"
y="601"
w="585"
h="18"
text="application as soon as possible. Please be patient as we are very busy preparing"
  fontname="Arial Black"
  fontcolor="0xFFFFFF"
  fontsize="13"
></label>

<label
name="My Text 14"
x="30"
y="621"
w="360"
h="18"
text="to wreak havoc on the server day in and day out. "
  fontname="Arial Black"
  fontcolor="0xFFFFFF"
  fontsize="13"
></label>

<label
name="My Text 15"
x="545"
y="648"
w="93"
h="18"
text="THE ELDERS"
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<submitbutton
name="Submit Button 1"
x="524"
y="530"
w="100"
h="20"
label="Submit"
fontname="Arial"
fontcolor="0x000000"
  fontsize="12"
isbrowse="f"
></submitbutton>

<label
name="My Text 16"
x="26"
y="326"
w="528"
h="18"
text="Please check which aspect(s) of the game interests you the most below."
  fontname="Arial Black"
  fontcolor="0xFF0000"
  fontsize="13"
></label>

<checkbox
name="PvP Check Box"
x="38"
y="357"
w="38"
h="19"
label="PvP"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<checkbox
name="PvE Check Box"
x="104"
y="357"
w="37"
h="19"
label="PvE"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<checkbox
name="Economy Check Box"
x="166"
y="357"
w="68"
h="19"
label="Economy"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<checkbox
name="Politics Check Box"
x="258"
y="357"
w="58"
h="19"
label="Politics"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<checkbox
name="Raiding Check Box"
x="342"
y="357"
w="58"
h="19"
label="Raiding"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<checkbox
name="Grouping Check Box"
x="429"
y="357"
w="67"
h="19"
label="Grouping"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

<checkbox
name="Other Check Box"
x="529"
y="357"
w="48"
h="19"
label="Other"
labelPos="right"
value="checked"
fontbold="bold"
  fontsize="12"
  fontname="Arial"
  fontcolor="0xC0C0C0"
></checkbox>

</form>


Does anybody have any idea what I would have to add to get it to post the results in a forum?
Title: Re: Article - New topic form (pre-formated topic)
Post by: NYPDSwat on May 03, 2008, 05:21:48 AM
Am I doing something wrong here it wont go to the post stage  :-\

<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 width="168"><font color="#FF0000">
Real first name: </td><td width="300"><input type='text' name='txtRealName' size='50' value=''></td>
</tr>
<tr><td><font color="#FF0000">
Age: </td><td><input type='text' name='txtAge' size='50' value=''></td>
</tr>
<tr><td><font color="#FF0000">
Location: </td><td><input type='text' name='txtLocation' size='50' value=''></td>
</tr>
<tr><td><font color="#FF0000">
Current status (RL): </td><td><input type='text' name='txtCStat' value='employed, school, etc...' size='50'></td>
</tr>
<tr>
  <td><font color="#FF0000">
In Game Name: </td>
  <td><input type='text' name='txtMCName' size='50' value=''></td>
</tr>
<tr>
  <td><font color="#FF0000">
Honor Level: </td>
  <td><input type='text' name='txtClass' size='50' value=''></td>
</tr>
<tr>
  <td><font color="#FF0000">
Time of Day You Play: </td><td><input type='text' name='txtPlaytime' size='50' value=''></td>
</tr>
<tr>
  <td><font color="#FF0000">
Favored Maps: </td><td><input type='text' name='txtFavClass' size='50' value=''></td>
</tr>
</table>
<br />
<font color="#FF0000">
Are you currently in a Clan or have you previously been Clan?
<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 Clan?<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. <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 The Fast Moving Zombies?<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://fastmovingzombies.clanservers.com/index.php?action=post;board=33.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;
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='\nAre you currently in a guild or have you previously been Clan?\n';
str11='\nWhy did/do you wish to leave that guild?\n';
str12='\n\nReferral:\n';
str13='\n\nWhat are your goals in game?\n';
str14='\n\nWhy do you want to Join The Fast Moving Zombies?\n';
str15='\n\n(Optional) Other Comments:\n\n';

strPart1=str1+strRFN+str2+strAge+str3+strLoc+str4+strCS+str5+strMCN+str6+strClass+str7++str8+strPlytm+str9+strFavClass+str10+strOtherGuild;
strPart2=str11+strGuildLeave;
strPart3=str12+strRef+str13+strGoals+str14+strWhy;
strPart4=str15+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 Rules of Conduct. 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="#FF0000">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>


Title: Re: Article - New topic form (pre-formated topic)
Post by: IchBin on May 03, 2008, 04:41:03 PM
Did you modify which board its posting to? Look at the code and you'll see it posts to a certain board. Make sure you have the same board ID number that you need to use.
Title: Re: Article - New topic form (pre-formated topic)
Post by: NYPDSwat on May 04, 2008, 02:58:54 AM
Thanks IchBin board it was posting to was correct but as I looked colser I found something else that was wrong :)

Now it works Hooah!!!
Title: Re: Article - New topic form (pre-formated topic)
Post by: Ripchi on June 06, 2008, 02:54:42 PM
I'm using the code from below and wondering if anyone can tell me how to add a drop down selection menu?  For example, I want to include a list of the US states, and they can click the box to select the state they reside in.  I'm new to all this, so any help is appreciated.

Quote from: Noam on March 21, 2007, 01:39:51 AM
Late to the party, I know, but in case people were looking for some other examples, here's one for our WoW guild. We needed some longer text entry areas, and believe me, getting textareas on the form was a pain:

Made a php article titled "Apply to FOO" and linked it off the front page, contents follows:


/*
Noam's Notes:
0. Backslash every apostrophe in the big echo statement below.
1. Never, ever put in a closing textarea tag literally. It will screw up the article editor somethin' fierce. Use '</text'.'area>' instead.
*/
echo '
<form name="application">
    <p>1. Say hello and tell us a little bit about yourself: this is the only in-character question in this application. If you\'re new to RP don\'t stress over this. Just a quick hello and who you are.<br />
    Character Name: <input type="text" name="characterName" size="40"><br>
    Character Introduction:<br>
    <textarea rows="10" cols="80" name="characterIntro"></text'.'area></p>
    <p>2. Is this your main character and what level are you?<br />
    <input type="radio" name="isMain" value="Yes" />Yes, this is my main character.<br />
    <input type="radio" checked="checked" name="isMain" value="No" />No, this is not my main character.<br />
    <input maxlength="2" size="3" name="characterLevel" type="text" />Level</p>
    <p>3. Please list the guilds on BAR you have been a member of. If you\'re a transfer, please list the server and guilds you have transferred from and the reason you transferred.<br />
    <textarea rows="10" cols="80" name="priorGuilds"></text'.'area></p>
    <p>4. Do you have any Alternative Characters you wish to bring into the guild? If yes, what are their names and levels?<br />
    <textarea rows="10" cols="80" name="altCharacters"></text'.'area></p>
    <p>5. Have you ever had a character enrolled in FOO or BAZ in the past? If yes, what were your reasons for leaving, and what was the name of the character you were enrolled under?<br />
    <textarea rows="10" cols="80" name="priorFooCharacters"></text'.'area></p>
    <p>6. What is it that you are looking for in and want from a guild?<br />
    <textarea rows="10" cols="80" name="whatLookingFor"></text'.'area></p>
    <p>7. What is it you bring to the guild? (trade skills, etc. Anything else you think is pertinent)<br />
    <textarea rows="10" cols="80" name="whatBringing"></text'.'area></p>
    <p>8. What is your RP (Role Playing) experience?<br />
    <textarea rows="10" cols="80" name="rpExperience"></text'.'area></p>
    <p>9. How long have you played WoW?<br />
    <textarea rows="10" cols="80" name="howLongPlayed"></text'.'area></p>
    <p>10. Have you created a history or back story for you character? (not a requirement; see the Conduct)<br />
    <input type="radio" name="hasBackstory" value="Yes" />Yes, I have a backstory.<br />
    <input type="radio" checked="checked" name="hasBackstory" value="No" />No, I have no backstory.</p>
    <p>Do you understand this must comply with WoW\'s Azerothian Lore as well as FOO\'s Lore and Conduct?<br />
    <input type="radio" name="understandLore" value="Yes" />Yes, I understand.<br />
    <input type="radio" checked="checked" name="understandLore" value="No" />No, I don\'t understand.</p>
    <p>How do you feel about advice or comments on your character\'s history/backstory?<br />
    <textarea rows="10" cols="80" name="feelAboutComments"></text'.'area></p>
    <p>11. Have you read The Conduct of FOO and agree to abide by these guidelines and rules?<br />
    <input type="radio" name="hasReadConduct" value="Yes" />Yes, I\'ve read it and I agree.<br />
    <input type="radio" checked="checked" name="hasReadConduct" value="No" />No. I\'ve either not read it, or don\'t agree.</p>
    <p>12. Do you have any comments or questions regarding joining or being a member of FOO?<br />
    <textarea rows="10" cols="80" name="commentsAndQuestions"></text'.'area></p>
    <p>13. Where did you hear of FOO?<br />
    <textarea rows="10" cols="80" name="whereYouHeard"></text'.'area></p>
</form>
<p>Thank you for your time in filling this out and reading the Conduct. We look forward to meeting you in game.</p>

<form action="http://SERVERNAME/index.php?action=post;board=TARGETBOARD" method="post" name="postmodify" id="postmodify" style="margin: 0;">
<input type="hidden" name="subject">
<input type="hidden" name="icon" id="icon" value="xx">
<input type="hidden" name="message">
<input type="hidden" name="sc" value="'.$context['session_id'].'">

<script>
function CompileForm()
{

  characterName=document.application.characterName.value;
  characterIntro=document.application.characterIntro.value;

  for (i=0;i<document.application.isMain.length;i++){
    if (document.application.isMain[i].checked==true){
      theone=i; break;
    }
  }
  if (theone==0) { isMain="Yes"; } else { isMain="No"; }

  characterLevel=document.application.characterLevel.value;
  priorGuilds=document.application.priorGuilds.value;
  altCharacters=document.application.altCharacters.value;
  priorFooCharacters=document.application.priorFooCharacters.value;
  whatLookingFor=document.application.whatLookingFor.value;
  whatBringing=document.application.whatBringing.value;
  rpExperience=document.application.rpExperience.value;
  howLongPlayed=document.application.howLongPlayed.value;

  for (i=0;i<document.application.hasBackstory.length;i++){
    if (document.application.hasBackstory[i].checked==true){
      theone=i; break;
    }
  }
  if (theone==0) { hasBackstory="Yes"; } else { hasBackstory="No"; }

  for (i=0;i<document.application.understandLore.length;i++){
    if (document.application.understandLore[i].checked==true){
      theone=i; break;
    }
  }
  if (theone==0) { understandLore="Yes"; } else { understandLore="No"; }

  feelAboutComments=document.application.feelAboutComments.value;

  for (i=0;i<document.application.hasReadConduct.length;i++){
    if (document.application.hasReadConduct[i].checked==true){
      theone=i; break;
    }
  }
  if (theone==0) { hasReadConduct="Yes"; } else { hasReadConduct="No"; }

  commentsAndQuestions=document.application.commentsAndQuestions.value;
  whereYouHeard=document.application.whereYouHeard.value;

  strCompiled=
    "[b]Character name:[/b] " + characterName + "\n\n" +
    "[b]Character introduction:[/b]\n" + characterIntro + "\n\n" +
    "[b]Main character?[/b] " + isMain + "\n" +
    "Level " + characterLevel + "\n\n" +
    "[b]Prior guilds:[/b]\n" + priorGuilds + "\n\n" +
    "[b]Alt characters:[/b]\n" + altCharacters + "\n\n" +
    "[b]Prior FOO characters:[/b]\n" + priorFooCharacters + "\n\n" +
    "[b]What you\'re looking for:[/b]\n" + whatLookingFor + "\n\n" +
    "[b]What you\'re bringing:[/b]\n"  + whatBringing + "\n\n" +
    "[b]RP experience:[/b]\n" + rpExperience + "\n\n" +
    "[b]How long you\'ve played WoW:[/b]\n" + howLongPlayed + "\n\n" +
    "[b]Has a backstory:[/b] " + hasBackstory + "\n" +
    "[b]Understands compliance with Lore:[/b] " + understandLore + "\n\n" +
    "[b]Feels about comments on backstory:[/b] " + feelAboutComments + "\n\n" +
    "[b]Has read conduct and agrees:[/b] " + hasReadConduct + "\n" +
    "[b]Comments/questions:[/b]\n" + commentsAndQuestions + "\n\n" +
    "[b]Where you heard about FOO:[/b]\n" + whereYouHeard;
 
  document.postmodify.subject.value="New Member Application: "+characterName;
  document.postmodify.message.value=strCompiled;
 
  document.postmodify.submit();
}
</script>

Click the button below, and you\'ll see a pre-formatted post on the member applications board, where you will still need to hit the Post button to actually apply.<br>
<input type="button" name="btnSubmit" value="Submit Application" onclick="CompileForm()">
</form>
';


Title: Re: Article - New topic form (pre-formated topic)
Post by: Rebecca on July 13, 2008, 06:38:18 PM
hi everyone,

i just found this site www.emailmeform.com you can create your own forms and have the details emailed to you, I am running this on my site for competitions!! :-)
Title: Re: Article - New topic form (pre-formated topic)
Post by: ianus on July 16, 2008, 12:09:26 PM
Greetings!


@Rebecca
Thanks a lot for this link. It seems to solve a lot of problems with individual preformatted topics. (At least for me, because I have no coding knowledge and always problems to keep the dependencies between the form and the compilation intact.)

Before I register at www.emailmeform.com, I would like to know how the code looks, which is generated and send and what I have to add, to make it work inside the TP.

In my case, I don’t need a contact form but an easy way (for users) to submit News and Charakter-Guides. (Examples, see below.)

Maybe you can give an example of the code they send and an example of the final implementation?


Then I have read this:
Quote
Your web hosting server does not need to be able to run scripts, our powerful server process the form submission, sends you an email with the information and then redirect the visitor to your thank you web page, without the visitor knowing he left your web site.

I think I don’t understand.
I show the input-page at MySite, a user fill out the form
-> it is send to another server (our powerful server process the form submission)
-> I receive the result vie mail (sends you an email with the information)
-> the user is redirected to a (my) page (then redirect the visitor to your thank you web page)

Sound strange.

Maybe you can describe a bit, how you use this service an the code?


(Exmples only to make clear what I want to include. Not an request or something)
Example: News
[Topic Title]:
[Headline]:
[Some Text]:
[Maybe a quote]: [ quote ][ /quote ]
[Source]:

Example: CharGuide
[Topic Title]:
[Introduction]
[desired attribute a]:
[desired attribute b]:
…
[Ability a]:
[Ability b]:
…
[How to play]:
[Recommended Companions]:

Title: Re: Article - New topic form (pre-formated topic)
Post by: Rebecca on July 16, 2008, 01:14:30 PM
Hi ianus,

Ok you dont have to worry about doing any scripts as such, its generates a code that you put in a html article, i have used it a few times on my site now and i absolutely love it... you can see a preview of one of my forms here (At the very bottom "click here to enter") http://www.bu-community.com/index.php?page=63

this is the code it generated after i entered what fields/items i wanted...

<a target="_new" href="http://www.emailmeform.com/fid.php?formid=112582">Click Here to Enter</a>

you will need to create another article so that when people submit the form they will be directed to that page, it emails you straight away with all the details. comes highly recommended, i think its awesome and even better its free and does everything the paid ones do... i had a look at quiet a few before i settled for this one and im more than happy!

hope that helps, if you need any help or have any other questions just pm me :)
Title: Re: Article - New topic form (pre-formated topic)
Post by: ianus on July 16, 2008, 04:37:39 PM
Greetings!

Thanks a lot for you kind reply!

Well, I see what this side offers more clearly now and imho it is be a nice function for webmasters.
But the service don’t meet my requirements because there is no own form which I can put into an article and finally send is as an topic to the SMF.

Anyway, this leads me to an interesting idea.

Thanks again for your time.
Regards
ianus
Title: Re: Article - New topic form (pre-formated topic)
Post by: Rebecca on July 17, 2008, 12:35:26 AM
Your welcome if you look back through this topic you will see some codes that will give you the option of creating a topic rather than emailing. Good luck :)
Title: Re: Article - New topic form (pre-formated topic)
Post by: mrsk on March 26, 2009, 11:00:30 PM
I know this is an old thread but I was wondering if someone could help me... I used this code (tried in html and php) and cannot get it to post when I hit submit ...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Join</title>
</head>

<body>
<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 (Time Zone ONLY!!): </td><td><input type='text' name='txtLocation' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
PSN Name: </td><td><input type='text' name='txtPSNName' size='50' value=''></td>
</tr>
<tr><td><font color="#FFFFCC">
Playtime: </td><td><input type='text' name='txtPlaytime' size='50' value=''></td>
</tr>
</table>
<br /><font color="#FFFFCC">
Are you currently in a clan or have you previously been in a clan? <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 clan?<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 />

Reason for Applying (Why did you choose AsY)?<br />
<textarea class='editor' rows='5' cols='60' style='color: #800000' name='taGoals'></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.asylumclan.com/forums/index.php?board=11.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;
strPSNN=document.frmFill.txtPSNName.value;
strPlytm=document.frmFill.txtPlaytime.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;
strWhy=document.frmFill.taWhyJoin.value;
strComments=document.frmFill.taComments.value;


str1='Real first name: ';
str2='\nAge: ';
str3='\nLocation: ';
str5='\nPSN Name: ';
str6='\nClass: ';
str7='\nLevel: ';
str8='\nPlaytime: ';
str12='\nAre you currently in a clan or have you previously been clan?\n';
str13='\nWhy did/do you wish to leave that clan?\n';
str14='\n\nReferral:\n';
str16='\n\nReason for Applying (Why did you choose AsY)?\n';
str17='\n\n(Optional) Other Comments:\n\n';

strPart1=str1+strRFN+str2+strAge+str3+strCS+str5+strPSNN+str6+strClass+str7+strLvl+str8+strPlytm+str12+strOtherGuild;
strPart2=str13+strGuildLeave;
strPart3=str14+strRef+str16+strWhy;
strPart4=str17+strComments;


strCompiled=strPart1+strPart2+strPart3;

document.postmodify.subject.value=strPSNN;
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 [AsY] Code of Honor. If accepted as a Cadet, 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>

</body>
</html>


now I put it in where I want it to post.. and still nothing when I submit.... I named this file join.html and placed it in my Main site section with all my other files, and it is supposed to post in another section of my files under forums .. am I placing it wrong?? ... the app comes up and everything there is right but it just will not submit... I am using SMF forums and I am just learning by trial and error mostly html/php coding, so it just may be that I dont have it where it should be... any ideas please let me know.... thanks
Title: Re: Article - New topic form (pre-formated topic)
Post by: ZarPrime on March 27, 2009, 12:31:27 AM
mrsk,

Welcome to TinyPortal.

Please Read and Reply to the Posting Guidelines (http://www.tinyportal.net/index.php/topic,581) and give us as much information as you can about your setup, including a link to your site.  Also, there is no php in that code so it won't work in a php block.  One of our coders will have to take a look at your code so please be patient until they can get on here and look at it.

ZarPrime
Title: Re: Article - New topic form (pre-formated topic)
Post by: Ianedres on March 27, 2009, 12:53:31 AM
Not a javascript guru, but the form's action is set to go to board #11. I would think it needs to call a php script to process the POST info to insert it into the database, but I didn't read back over five pages of posts either.