• Hi my friends,

    I am contacting you because I created my first website (be nice with me, I made it without any experience ahah). It s a surprise to my dad’s bday ??
    I have one problem with the enquire form which is located in my properties pages. When I try to use it, I receive a message saying ‘unable to send the message’.

    What could I do to make it work?

    Thank you so much guys.

    Marc ==> wallonieimmo.be

    (my template is : Realocation)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter margzmi

    (@margzmi)

    here is the code I found :

    [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]

    <?php
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    }
    ?>
    
    <?php if ( ! empty( $name ) ) : ?>
        <strong><?php echo __( 'Name', 'realia' ); ?>: </strong> <?php echo esc_attr( $name ); ?>
    <?php endif; ?>
    
    <?php if ( ! empty( $email ) ) : ?>
        <strong><?php echo __( 'E-mail', 'realia' ); ?>: </strong> <?php echo esc_attr( $email ); ?>
    <?php endif; ?>
    
    <?php $permalink = get_permalink( $post->ID ); ?>
    <?php if ( ! empty( $permalink ) ) : ?>
        <strong><?php echo __( 'URL', 'realia' ); ?>: </strong> <?php echo esc_attr( $permalink ); ?>
    <?php endif; ?>
    
    <?php if ( ! empty( $_POST['message'] ) ) : ?>
        <?php echo esc_html( $_POST['message'] ); ?>
    <?php endif; ?>

    Thank you ??

    Best regard

    I have a question if I want to add more fields, it is that I need to add phone, city and country and it is working as you would?

    <?php if ( ! empty( $name ) ) : ?>
    <?php echo __( ‘Name’, ‘realia’ ); ?>: <?php echo esc_attr( $name ); ?>
    <?php endif; ?>

    <?php if ( ! empty( $email ) ) : ?>
    <?php echo __( ‘E-mail’, ‘realia’ ); ?>: <?php echo esc_attr( $email ); ?>
    <?php endif; ?>

    <?php $permalink = get_permalink( $post->ID ); ?>
    <?php if ( ! empty( $permalink ) ) : ?>
    <?php echo __( ‘URL’, ‘realia’ ); ?>: <?php echo esc_attr( $permalink ); ?>
    <?php endif; ?>

    <?php if ( ! empty( $_POST[‘message’] ) ) : ?>
    <?php echo esc_html( $_POST[‘message’] ); ?>
    <?php endif; ?>

    Thread Starter margzmi

    (@margzmi)

    Hello yor326,

    I have no idea to solve your problem, I even still don’t know how to solve mine. I just got this : [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ] but I have no idea what to do with…

    Do you have the same problem has me?

    Have a great day

    Marc ([email protected])

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Enquire form doesn't work’ is closed to new replies.