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

Recent

Welcome to TinyPortal. Please login or sign up.

May 18, 2024, 03:12:08 AM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,189
  • Total Topics: 21,220
  • Online today: 112
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 62
  • Total: 62

Forms not allowed in article editor?

Started by misjka, March 21, 2006, 09:06:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

misjka

Hi there!

Recently I tried to write an article which contained a form (incl. a cgi-bin action), but as I was to publish the article as admin the article totally screwed up the portal formatting, and the Send-button did not work... I give you all my form code here:




<FORM name=form1 action=/cgi-sys/FormMail-clone.cgi method=post
      encType=multipart/form-data>
      <TABLE cellSpacing=2 cellPadding=2 width="100%" border=0>
        <TBODY>
        <TR>
          <TH class=smallTableHeader scope=col colSpan=2>
            <H2 align=center><INPUT type=hidden value=info@rm8s.net
            name=recipient> <INPUT type=hidden value="Wanna be a [RM8s] mate!"
            name=subject> <INPUT type=hidden
            value=http://www.rm8s.net/html/formThx.shtml name=redirect> <INPUT
            type=hidden value=http://www.rm8s.net/html/formErrMissField.shtml
            name=missing_fields_redirect> <INPUT id=required type=hidden
            value=realname,email,RM8sNickName,ManifestoChecked name=required>
            <INPUT id=order type=hidden
            value=order:realname,email,RM8sNickName,Nationality,City,checkbox1,checkbox2,checkbox3,checkbox4,checkbox5,checkbox6,checkbox7,checkbox8,checkbox9,checkbox10,checkbox11,checkbox12,checkbox13,PreferOtherSims,LFSWNameS1,LFSWNameS2,Comments
            name=sort> [RM8s] Application Form </H2></TH></TR>
        <TR>
          <TD class=smallTableText scope=col width="30%">
            <DIV align=right>Your full name:</DIV></TD>
          <TD class=smallTableText scope=col>
            <DIV align=left><INPUT size=40 name=realname> *Required</DIV></TD></TR>
        <TR>
          <TD class=smallTableText>
            <DIV align=right>Your valid e-mail address: </DIV></TD>
          <TD class=smallTableText>
            <DIV align=left><INPUT size=40 name=email> *Required</DIV></TD></TR>
        <TR>
          <TD class=smallTableText>
            <DIV align=right>Preferred [RM8s] nick name: </DIV></TD>
          <TD class=smallTableText><INPUT id=RM8sNickName maxLength=6 size=6
            name=RM8sNickName> @rm8s.com *Required</TD></TR>
        <TR>
          <TD class=smallTableText vAlign=top height=110>
            <DIV align=right>Preferred racing sims: </DIV></TD>
          <TD class=smallTableText vAlign=top width="70%"><INPUT id=checkbox1
            type=checkbox value="I prefer LFS" name=checkbox1> Live For
            Speed<BR><INPUT id=checkbox2 type=checkbox value="I prefer GTR"
            name=checkbox2> GTR<BR><INPUT type=checkbox
            value="I prefer Nascar 2003" name=checkbox3> Nascar Racing 2003
            Season<BR><INPUT type=checkbox value="I prefer F1 Challenge 99-02"
            name=checkbox4> F1 Challenge '99-'02<BR><INPUT type=checkbox
            value="I prefer other sim(s)" name=checkbox5> Other(s): <INPUT
            id=PreferOtherSims maxLength=40 size=40 name=PreferOtherSims></TD></TR>
        <TR>
          <TD class=smallTableText vAlign=top height=158>
            <DIV align=right>You are a...:</DIV></TD>
          <TD vAlign=top>
            <P class=smallTableText><INPUT id=checkbox6 type=checkbox
            value="I'm a LFS S1 demo driver" name=checkbox6> Live For Speed S1
            demo driver<BR><INPUT id=checkbox7 type=checkbox
            value="I'm a LFS S1 licensed driver" name=checkbox7> Live For Speed
            S1 licensed driver. Your LFSW name: <INPUT id=LFSWNameS1
            maxLength=15 size=10 name=LFSWNameS1> <BR><INPUT id=checkbox8
            type=checkbox value="I'm a LFS S2 demo driver" name=checkbox8> Live
            For Speed S2 demo driver<BR><INPUT id=checkbox9 type=checkbox
            value="I'm a LFS S2 licensed driver" name=checkbox9> Live For Speed
            S2 licensed driver. Your LFSW name: <INPUT id=LFSWNameS2
            maxLength=15 size=10 name=LFSWNameS2> <BR><INPUT id=checkbox10
            type=checkbox value="I'm a GTR demo driver" name=checkbox10> GTR
            demo driver<BR><INPUT id=checkbox11 type=checkbox
            value="I'm a GTR licensed driver" name=checkbox11> GTR licensed
            driver<BR><INPUT id=checkbox12 type=checkbox
            value="I'm a Nascar 2003 demo driver" name=checkbox12> Nascar 2003
            demo driver<BR><INPUT id=checkbox13 type=checkbox
            value="I'm a Nascar 2003 licensed driver" name=checkbox13> Nascar
            2003 licensed driver </P></TD></TR>
        <TR>
          <TD class=smallTableText>
            <DIV align=right>Your nationality: </DIV></TD>
          <TD><SELECT id=Nationality name=Nationality> <OPTION value=Sweden
              selected>Sweden</OPTION> <OPTION value=Norway>Norway</OPTION>
              <OPTION value=Denmark>Denmark</OPTION> <OPTION
              value=Finland>Finland</OPTION></SELECT> <SPAN
            class=smallTableText>*Required</SPAN></TD></TR>
        <TR>
          <TD class=smallTableText height=31>
            <DIV align=right>City:</DIV></TD>
          <TD><INPUT id=City size=35 name=City> <SPAN
            class=smallTableText>*Required</SPAN></TD></TR>
        <TR>
          <TD class=smallTableText vAlign=top>
            <DIV align=right>Any comments: </DIV></TD>
          <TD><TEXTAREA id=Comments name=Comments rows=4 cols=50></TEXTAREA></TD></TR>
        <TR>
          <TD class=smallTableText>&nbsp;</TD>
          <TD><INPUT id=ManifestoChecked type=checkbox value=checkbox
            name=ManifestoChecked> <SPAN class=smallTableText>I have read the <A
            href="http://www.rm8s.net/html/manifesto.shtml">manifesto</A> and
            agree with it. *Required</SPAN></TD></TR>
        <TR>
          <TD class=smallTableText>
            <DIV align=right><INPUT type=reset value=Clear name=Reset> </DIV></TD>
          <TD>
            <DIV align=left><INPUT type=submit value=Submit name=Submit>
          </DIV></TD></TR></TBODY></TABLE></FORM>




Is there a way to make articles with forms work in the Approval screen...? As it seems, it's the Clear and Submit part of the form that screws the formatting up, since that part of the form shows up above the rest of the form in the Approval screen although it should remain below...

(Ô¿Ô)

Give this a try

<form name="form1" action="/cgi-sys/FormMail-clone.cgi" method= "post" enctype="multipart/form-data" id="form1"><table cellspacing="2" cellpadding="2" width="100%" border="0"><tbody><tr><th class="smallTableHeader" scope="col" colspan="2"><h2
align="center"><input type="hidden" value="info@rm8s.net" name="recipient"><input type="hidden" value= "Wanna be a [RM8s] mate!" name="subject"><input type="hidden" value="http://www.rm8s.net/html/formThx.shtml" name="redirect"><input type="hidden"
value= "http://www.rm8s.net/html/formErrMissField.shtml" name= "missing_fields_redirect"><input id="required" type="hidden" value="realname,email,RM8sNickName,ManifestoChecked" name= "required"><input id="order" type="hidden" value=
"order:realname,email,RM8sNickName,Nationality,City,checkbox1,checkbox2,checkbox3,checkbox4,checkbox5,checkbox6,checkbox7,checkbox8,checkbox9,checkbox10,checkbox11,checkbox12,checkbox13,PreferOtherSims,LFSWNameS1,LFSWNameS2,Comments" name="sort">
[RM8s] Application Form</h2></th></tr><tr><td class="smallTableText" scope="col" width="30%"><div align="right">Your full name:</div></td><td class="smallTableText" scope="col"><div align="left"><input size="40" name="realname"> *Required</div>
</td></tr><tr><td class="smallTableText"><div align="right">Your valid e-mail address:</div></td><td class="smallTableText"><div align="left"><input size="40" name="email"> *Required</div></td></tr><tr><td class="smallTableText"><div
align="right">Preferred [RM8s] nick name:</div></td><td class="smallTableText"><input id="RM8sNickName" maxlength="6" size="6" name="RM8sNickName"> @rm8s.com *Required</td></tr><tr><td class="smallTableText" valign="top" height="110"><div
align="right">Preferred racing sims:</div></td><td class="smallTableText" valign="top" width="70%"><input id= "checkbox1" type="checkbox" value="I prefer LFS" name= "checkbox1"> Live For Speed<br><input id="checkbox2" type="checkbox" value="I prefer
GTR" name= "checkbox2"> GTR<br><input type="checkbox" value="I prefer Nascar 2003" name= "checkbox3"> Nascar Racing 2003 Season<br><input type="checkbox" value="I prefer F1 Challenge 99-02" name= "checkbox4"> F1 Challenge '99-'02<br><input
type="checkbox" value="I prefer other sim(s)" name= "checkbox5"> Other(s): <input id="PreferOtherSims" maxlength="40" size="40" name="PreferOtherSims"></td></tr><tr><td class="smallTableText" valign="top" height="158"><div align="right">You are
a...:</div></td><td valign="top"><p class="smallTableText"><input id="checkbox6" type="checkbox" value="I'm a LFS S1 demo driver" name="checkbox6"> Live For Speed S1 demo driver<br><input id="checkbox7" type="checkbox" value= "I'm a LFS S1 licensed
driver" name="checkbox7"> Live For Speed S1 licensed driver. Your LFSW name: <input id="LFSWNameS1" maxlength="15" size="10" name="LFSWNameS1"><br><input id="checkbox8" type="checkbox" value= "I'm a LFS S2 demo driver" name="checkbox8"> Live For Speed
S2 demo driver<br><input id="checkbox9" type="checkbox" value= "I'm a LFS S2 licensed driver" name="checkbox9"> Live For Speed S2 licensed driver. Your LFSW name: <input id="LFSWNameS2" maxlength="15" size="10" name="LFSWNameS2"><br><input
id="checkbox10" type="checkbox" value= "I'm a GTR demo driver" name="checkbox10"> GTR demo driver<br><input id="checkbox11" type="checkbox" value= "I'm a GTR licensed driver" name="checkbox11"> GTR licensed driver<br><input id="checkbox12"
type="checkbox" value= "I'm a Nascar 2003 demo driver" name="checkbox12"> Nascar 2003 demo driver<br><input id="checkbox13" type="checkbox" value= "I'm a Nascar 2003 licensed driver" name="checkbox13"> Nascar 2003 licensed driver</p></td></tr><tr>
<td class="smallTableText"><div align="right">Your nationality:</div></td><td><select id="Nationality" name="Nationality"><option value="Sweden" selected>Sweden</option><option value="Norway">Norway</option><option
value="Denmark">Denmark</option><option value="Finland">Finland</option></select><span class="smallTableText">*Required</span></td></tr><tr><td class="smallTableText" height="31"><div align="right">City:</div></td><td><input id="City"
size="35" name="City"><span class= "smallTableText">*Required</span></td></tr><tr><td class="smallTableText" valign="top"><div align="right">Any comments:</div></td><td><textarea id="Comments" name="Comments" rows="4" cols="50">
</textarea></td></tr></tbody></table>
</form>


By getting rid of the whitespace i have gotten these to work sometimes. But tp's articles section isn't all that capable yet so there are no guarantees.

misjka

#2
Thanks for quick response! But, to me it seems like the Clear and Submit section of the form is missing in your code...?

It happened to me too sometimes, that the buttons were removed from the code after I had approved the article...

And still, the formatting of the Approval screen looks pretty messy over here... :(

Turning the wysiwyg editor off doesn't make it work better either...

(Ô¿Ô)

That is strange. Ill see what I can come up with and post it back here. I do know that the wysisyg editor really sucks even when it isnt turned on. Ive never found one worth anything.

misjka

Much obliged  :P!

Yeah, I've also been messing around with some wysiwyg editors and unfortunately I have the same experience... :( I wonder: Why is it so hard to accomplish a good editor, since this really should be one of the most important modules in a portal/cms?!?

bloc

Try to remove the "align=right" in the last divs there, and rather set it inside the <td> instead.

But I am curious, is the layout the only thing not working? Or doesn't it get sent at all?

misjka

Well, if I write the article as admin there will be no problems publishing it... But, if I write it as a user, then the admin's approval won't work (Send button doesn't work). If written by admin, editing the article later on won't work either...

OK, I'll check that aligning...

misjka

I removed the align in two last divs, but the was nothing much for a change... :-\ It really looks like it's the Submit & Clear buttons that screw things up...

Crip

PHP forms do work well in Articels, .cgi/perl maybe the problem?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Elen

I also have problems with forms in articles.  I can create a new article with a form in it but am unable to change it in any way as the send button doesn't work.  I've turned off the wysiwyg editor and it hasn't made any difference.  What I have noticed since I turned it off is that the form code seems to be interpreted by TP as part of the article page.  At the top of the edit article page I have a white box with the code in it - up to where the form starts!  The form itself is not editable and is displayed as part of the edit page.  Is there a way around this - without using an iFrame?