• Forum
  • FAQ
  • Docs
Notice: In order to post a support question you have to have an account and be logged in.
Register  or  Login
  1. I need to add another contact form besides the normal one, so I simply duplicated "template-contact.php" and named it something like "template-questions.php".

    So in the new template I also added new questions drop-down lists etc. and all is displayed correctly.

    Problem: When I click on "send message" the form hides itself and nothing else happens. Normally there should be a message like "has been sent successfully".
    I figured that there must be an id="email" and id="message" input field when I don't want to edit your validation in "sendmail.js" and "sendmail.php", so I kept those fields. Still the newly created form doesn't want to work..
    Please note: The normal "template-contact.php" and "template-reservation.php" work without problems!

    Any ideas how to implement it correctly so that the message of my modified contact form will be sent?

    Regards,
    happysmile :)

    happysmile
    11 months ago
  2. Hi,
    do you changed template name in new template file? There is a row in the file from where you set template name. If yes, please provide a link and I would take a look into this.

    Cheers,
    Max.

    Max
    11 months ago
  3. Do you mean the Wordpress template name? Yes, I changed that as well...

    Unfortunately I cannot give you a link because right now I'm testing on a local installation.
    But basically it looks like this (I didn't change anything above or below that):

    `<div class="contact-form"><br />
    	<a></a><br />
    	<form  id="commentform" action="" method="post" class="ajax_form" name="contactForm"><br />
    		<input type="hidden" name="temp_url" value="<?php bloginfo('template_directory'); ?>" /><br />
    		<input type="hidden" id="tempcode" name="tempcode" value="<?php echo base64_encode(get_option('admin_email')); ?>" /><br />
    		<input type="hidden" id="myblogname" name="myblogname" value="<?php bloginfo('name'); ?>" /><br />
    		<input type="hidden" id="mailtype" name="mailtype" value="reservation-questionnaire" /><br />
    	<?php if (!isset($error) || $error == true){ ?></p>
    <p>		<div class="row field_text alignleft"><br />
    			<label><?php _e('[:en]Your name[:de]Name', 'tfuse') ?>:</label><br />
    			<input type="text" id="name" name="Personal Name" class="inputtext input_middle required" size="40" /><br />
    		</div><br />
    		<div class="row field_text alignleft"><br />
    			<label><?php _e('[:en]Your email[:de]E-Mail', 'tfuse') ?>:</label><br />
    			<input type="text" id="email" name="Personal Email" class="inputtext input_middle required" size="40" /><br />
    		</div><br />
    		<div class="divider_thin"></div></p>
    <p>		<!-- More questions... --></p>
    <p>		<div class="row field_select alignleft"><br />
    			<label><?php _e('[:en]Experience[:de]Erfahrung', 'tfuse') ?>:</label><br />
    			<select id="experience" name="Experience" class="select_styled"><br />
    				<option value="beginner"><?php _e('[:en]Beginner[:de]Anfänger', 'tfuse') ?></option><br />
    				<option value="average"><?php _e('[:en]Average[:de]Durchschnittlich', 'tfuse') ?></option><br />
    				<option value="advanced"><?php _e('[:en]Advanced[:de]Fortgeschritten', 'tfuse') ?></option><br />
    			</select><br />
    		</div></p>
    <p>		<!-- More questions... --></p>
    <p>		<div class="row field_textarea"><br />
    			<label><?php _e('[:en]Additional notes[:de]Weitere Anmerkungen', 'tfuse') ?>:</label><br />
    			<textarea id="message" name="Notes" class="textarea textarea_middle required" cols="40" rows="3"></textarea><br />
    		</div><br />
    		<div class="clear"></div></p>
    <p>		<div class="row field_submit"><br />
    			<span class="reset-link"><a href="#"><?php _e('[:en]reset all fields[:de]alle Felder zurücksetzen', 'tfuse') ?></a></span><br />
    			<input type="submit" id="send" value="<?php _e('[:en]Send Message[:de]Nachricht abschicken', 'tfuse') ?>" class="contact-submit submit" /><br />
    		</div>                               </p>
    <p>	<?php } else { ?> </p>
    <p>		<h2 style="width:100%;"><?php _e('[:en]Your message has been sent![:de]Die Nachricht wurde verschickt!', 'tfuse') ?></h2><br />
    		<div class="confirm"><br />
    			<p class="textconfirm"><?php _e('[:en]Thank you very much.[:de]Vielen Dank.', 'tfuse') ?></p><br />
    		</div></p>
    <p>	<?php } ?></p>
    <p>	</form><br />
    </div><br />
    

    I remember that I had this behavior a couple of weeks before when I tried to add a captcha without modifying "sendmail.php". But it wasn't that important, so I wasn't really interested in finding the cause of the problem.

    However this time I have to get it work. Would be great if you know where the problem is.

    happysmile
    11 months ago
  4. By the way: I tried to post the code above as
    < blockquote> and < code> because I've seen that you support guys can post code with nice design!
    Unfortunately it didn't work... sorry. :(

    happysmile
    11 months ago
  5. Hi,
    in the file that you created you have this code at the beginning:

    /*
    Template Name: Contact Form
    */
    

    Here you need to change the name of the template.

    Also, the name for email field and message need to be email and message not Personal Email and Notes.

    After this it would work fine.

    Cheers,
    Max.

    Max
    11 months ago
  6. Thank you Max.

    I thought only the "id" is used. Anyway, works now!

    happysmile
    11 months ago

Add Reply

You must log in to post.

 

Add a new topic!

Chances are your issue is already answered, but if it’s not, you can always create a new topic.

Add new topic

Search forums

Searching for something specific? Type something and press Enter to search.