Problems adding a check box to a webform

If anyone can help I’d be very, very, grateful!! I have tried to edit this php form with image uploader, I have managed to ad another email to the form, however I need to ad a check box to the form, before the message field, it posts the name check box but no answer like this

Submission from ‘contact us’ form:
Name :test
Email :[email protected]
Email2 :[email protected]
Checkbox :
Message : tester
Submit : Submit

(I hope i have explain myself fairly well - still getting to grips with php)

online example

<?PHP /* Contact Form from HTML Form Guide This program is free software published under the terms of the GNU Lesser General Public License. See this page for more info: */ require_once("./include/fgcontactform.php"); $formproc = new FGContactForm(); //1. Add your email address here. //You can add more than one receipients. $formproc->AddRecipient('[email protected]'); //<SetFormRandomKey('FOCk8Nr0bfWLjgN'); $formproc->AddFileUploadField('photo','jpg,jpeg,gif,png,bmp',2024); if(isset($_POST['submitted'])) { if($formproc->ProcessForm()) { $formproc->RedirectToURL("thank-you.php"); } } ?> Contact us Contact us
* required fields
<?php echo $formproc->GetErrorMessage(); ?>
Your Full Name*:
' maxlength="50" />
Email Address*:
' maxlength="50" />
Email Address2*:
' maxlength="50" />
Do you need wheelchair access:
<?php echo $formproc->SafeDisplay('message') ?>
Upload your photo:

The proccer script corresponding code

I’m not sure what ‘answer’ is in your form. I think you wanted to do something like this:

<input name=“checkbox” type=“checkbox” id=“checkbox” value=“Yes”<?php echo ($formproc->SafeDisplay('checkbox') !== '' ? " checked=\"checked\"" : ""); ?> />[/php]

Hi Matt - thanks so much for taking the time to help me out, tried my best guesses but just couldn’t get it to work. Much appreciated!!

Sponsor our Newsletter | Privacy Policy | Terms of Service