Jump to content

Webform code help needed


1 post in this topic

Recommended Posts

I have a CGI script installed and tested on our server for dealing with webform submissions with a "type what you see in the box" section to stop the bots. I have some webform code that came with it but would prefer to use the form thats already in the intended site that Im working on.

 

Here is the supplied code

 

<form action="/mail/FormMail.cgi" method="post"> 
  <table> 
	<tr> 
	  <td> 
		<input type="hidden" name="subject" value="This is a test" /> 

		<!-- This section must remain the same for Captcha support. --> 
		<input type="hidden" name="recipient" value="enquiries@MYDOMAIN.co.uk" /> 
		<input type="hidden" name="redirect" value="http://MYDOMAIN.co.uk" /> 
		<input type="hidden" name="captcha-md5sum" value="a5e66074500d84a3f366d4b39dfe09e3" /> 
		<label>Email Address: </label> 
	  </td><td> 
		<input type="text" size="20" name="email"> 
	  </td> 

	</tr><tr> 
	  <td> 
		<label>Name: </label> 
	  </td><td> 
		<input type="text" size="20" name="realname"> 
	  </td> 
	</tr> 
	<!-- End section --> 

	<!-- You can add extra form items here --> 
	  <td style="vertical-align: top;"> 
		<label>Message: </label> 
	  </td><td> 
		<textarea name="message" style="height: 120px; width: 300px;"></textarea> 
	  </td> 
	</tr><tr> 

	<!-- The following section must stay here for Captcha support. --> 
	  <td colspan="2">Please enter the image verification code below.</td> 
	</tr><tr> 
	  <td><img src="/mail/img/a5e66074500d84a3f366d4b39dfe09e3.png" /></td> 
	  <td> 
		<input type="text" size="20" name="captcha-text" id="captcha-text" /> 
	  </td> 
	</tr> 

	<!-- End section --> 

	<tr> 
	  <td> </td> 
	  <td> </td> 
	</tr> 

	<tr> 
	  <td> 
		<input value="Submit Comments" type="submit" /> 

	  </td><td> 
		<input value="Clear Form" type="reset" /> 
	  </td> 
	</tr> 
  </table> 
</form>

 

 

 

It works but looks bad in its table format.

Here is the form Id rather use but with the functionality of the first one...makes sense?

 

<form method="post" action="" id="contactform">		 
			<fieldset>	 
				<label for="name">Name</label> <input type="text" name="name" id="name" value="" tabindex="1" /> 
				<label for="email">Email</label> <input type="text" name="email" id="email" value="" tabindex="2" /> 
				<label for="url">Current Website</label> <input type="text" name="url" id="url" value="" tabindex="3" /> 
				<label for="subject">Subject</label> <input type="text" name="subject" id="subject" value='' tabindex="4" /> 
				<label for="message">Message</label> <textarea name="message" id="message" tabindex="5" rows="5" cols="25"></textarea> 
				<input type="submit" name="submit" value="Send" class="send" tabindex="6" /> 
			</fieldset> 
		</form>

 

Can anybody mix them up for me so I get the functionality of the first but the references to the CSS with the second?

 

Thank you

Link to comment
Share on other sites

 Share

×
×
  • Create New...