简体   繁体   中英

Trying to add contact form

Been working on this a bit and somewhat dificult with my limited skills. I created the area so far but adding the contact form is proving to be a huge challenge for me.

This is the area so far: 在此处输入图片说明

The grey area is where I would like the contact form to go, something like this: 在此处输入图片说明

What I would like the contact form to achive:

  1. Add the (Ask a Question)

  2. Person using contact form has to input Name,email, and telephone before contact agent button allows to be sent.

  3. Info box to default message: I'm interested in the Post address but they can always override by typing in their own message.

  4. Contact message will be sent to whatever the above email address is populated (right now it's mine up there joe@teamambrose.realtor

  5. below the Contact Agent button show: By sending a request you agree to our Privacy Policy.

Here is where I am so far on the code:

 <!--======= Agent Info =========--> <section class="info-property agents-info"> <h5 class="tittle-head"><?php esc_html_e('agent details', 'realtor');?></h5> <div class="inner"> <!--======= AGENT DETAILS =========--> <div class="row"> <div class="col-sm-3"> <?php echo wp_get_attachment_image(_sh_get_attachment_id_from_src(sh_set($meta1, 'agent_img')), '270x288');?> </div> <div class="col-sm-9"> <?php $term_list = wp_get_post_terms(get_the_id(), 'property_agent', array("fields" => "names")); ?> <h5><?php echo implode( ', ', (array)$term_list );?></h5> <!--======= SOCIAL ICONS =========--> <ul class="social_icons"> <li class="facebook"><a href="<?php echo sh_set($meta1, 'facebook_link');?>"><i class="fa fa-facebook"></i></a></li> <li class="twitter"><a href="<?php echo sh_set($meta1, 'twitter_link');?>"><i class="fa fa-twitter"></i></a></li> <!--<li class="googleplus"><a href="<?php echo sh_set($meta1, 'google_plus_link');?>"><i class="fa fa-google-plus"></i></a></li>--> <!--<li class="linkedin"><a href="<?php echo sh_set($meta1, 'linked_in_link');?>"><i class="fa fa-linkedin"></i></a></li>--> <li class="instagram"><a href="<?php echo sh_set($meta1, 'instagram_link');?>"><i class="fa fa-instagram"></i></a></li> </ul> <p><?php $description = $agents_term[0]->description; echo $description;?></p> <!--======= AGENT INFOR =========--> <ul class="agent-info"> <li> <p><i class="fa fa-phone"></i> <?php echo sh_set($meta1, 'phone');?> </p> </li> <li> <p><i class="fa fa-envelope-o"></i><span style='font-size:11px'><?php echo sh_set($meta1, 'email');?></span></p> </li> <li> <p><i class="fa fa-home"></i> <?php printf( esc_html__('Listed %s Properties', 'realtor'), sh_set(sh_set($agents_term, 0 ) , 'count' ) );?> </p> </li> </ul> </div> </div> <div class="overlay"> <div class="container"> <h1><?php echo balanceTags($title);?></h1> <div class="pull-left"><?php echo balanceTags($title);?> </div> <h5> <div style="text-align: center;"> <?php echo 'Learn More: ' . get_the_title();?> </div> </h5> </div> </div> <div class="row"> <div class="col-sm-4"> <div style="height: 400px; width: 300px; background-color: #f8f8f8; border: 1px solid #dddddd;"> </div> </div> <div class="col-sm-8"> <div style="max-height: 400px; overflow: hidden; max-width: 610px; padding-left: 43px;"> <?php the_post_thumbnail('337x271', array('class' => 'img-responsive', 'style' => 'transform: translate(0%, -10%)'));?> </div> </div> </div> </section> 

Any help on this will be awesome!

Figured it out on my own. Had to wrap all the echo commands from tutorial in php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM