Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Can someone recommend a customizable contact form, please? Reply To: Can someone recommend a customizable contact form, please?

#169250
__
Participant

I’ve copied and paste the class definition into the form page and that’s pretty straightforward. I’m pretty sure I’m getting it in the correct place.

If you copy+paste it on the page, the class definition will be parsed by PHP before the script is run, so it doesn’t need to be in any particular spot.

It might be easier, however, to put it in its own file (e.g., “contactMichael1961.php“), and then include it on the page where you’re using it.

<?php
include_once "path/to/contactMichael1961.php";

// set up contact form object
$contactForm = new contactMichael1961;

// do this:
//  <?= $contactForm->cssStyle(); ?>
// in the html <head> where you want the <style> to appear

//  do this:
//  <?= $contactForm->htmlMarkup(); ?>
//  in the html <body> where you want the form itself to appear

Give me ’til tomorrow to try to figure this out

No problem. Remember to Ask if you have questions. : )