zenosis
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
They are both in the form but do not show up at the payment form and need to be entered manually.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Show Contact InformationI figured it out. I replaced the email section within “Show Contact Information” with a Contact Form below it.
Code:
<?php $contactEmail = get_post_meta( get_the_ID(), "adverts_email", true ) ?> <div class="adverts-contact-box"> <p class="adverts-contact-method"> <span class="adverts-icon-phone adverts-contact-icon" title="<?php _e("Phone", "adverts") ?>"></span> <span class="adverts-contact-phone"></span> </p> </div> <br /> <?php $action=$_REQUEST['action']; if ($action=="") /* display the contact form */ { ?> <form action="" method="POST" enctype="multipart/form-data"> <input type="hidden" name="action" value="submit"> Your name:<br /> <input name="name" type="text" value="" size="30"/ required><br /> Your email:<br /> <input name="email" type="text" value="" size="30"/ required><br> Your message:<br /> <textarea name="message" rows="7" cols="30" required></textarea><br /><br /> <input type="submit" value="Send email"/> </form> <?php } else /* send the submitted data */ { $name=$_REQUEST['name']; $email=$_REQUEST['email']; $message=$_REQUEST['message']; if (($name=="")||($email=="")||($message=="")) { echo "All fields are required."; } else{ $from="From: $name<$email>\r\nReturn-path: $email"; $subject="Message from Website"; mail( $contactEmail, $subject, $message, $from); echo "Your message has been sent! Thank you for your interest!"; } } ?>
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Show Contact InformationI have made the changes but the only thing I have not been able to figure out is how to pull the contact email address for the advert so that I can put it into the code for the submit button.
Viewing 3 replies - 1 through 3 (of 3 total)