Support » Plugins » Hacks » Lizard Themes Contact Form Redirect

  • Hello Everyone,

    First time user here, hoping to utilize this forum as a valuable tool to help me, as I work with several WordPress clients for a living. I’m doing some work for a client who has a theme installed on his site, from Lizard Themes. What I’m trying to do is to get his contact form to redirect to a thank you page after submission. This contact form is an element that comes packaged with the theme itself and is not a separate plugin, as far as I know (so this is outside my usual experience). I’ve already browsed the settings but I don’t see any option to allow me do redirects and I’ve also already contacted Lizard Themes but they don’t provide code editing services to individual users. They did, however, inform me that I would need to open the file ‘feedback.php’ and modify the following code:

    <form action='' method='POST'>
     <div class='uDetail'><span><?php _e('Name', 'lizard'); ?>:</span><div class='input'><input type='text' name='uName' value='' /></div></div>
     <div class='uDetail'><span><?php _e('Email', 'lizard'); ?>:</span><div class='input'><input type='text' name='uEmail' value='' /></div></div>
     <div class='uDetail'><span><?php _e('Subject', 'lizard'); ?>:</span><div class='input'><input type='text' name='uSubject' value='' /></div></div>
     <?php if ( count($feedback['department']) > 1 ) { ?>
     <div class='uDetail'><span><?php _e('Department', 'lizard'); ?>:</span><div class='input'><select name='uDepartment'>
     <?php foreach( $feedback['department'] as $department ) { ?>
     <option value="<?php echo $department['title']['value']; ?>"><?php echo $department['title']['value']; ?></option>
     <?php } ?>
     <?php } ?>
     <div class='uDetail'><span><?php _e('Message', 'lizard'); ?>:</span><div class='input'><textarea name='uMessage' rows='8'></textarea></div></div>
     <input type='submit' value='<?php _e('Send', 'lizard'); ?>' />
     <div class="clear"></div>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    FYI, I’m an entry-level developer and I’m proficient with the wordpress interface overall, plus I know HTML, CSS, and little bit of PHP. If anyone can tell me what code I need to change, I would greatly appreciate it. Thanks.

    PS. This is the site I’m working on…

Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    You could change the <form> tag action attribute to submit to the thank you page, but then you need to alter the thank you page to relay the form data back to feedback.php.

    I think a better approach is to use javascript to display the thank you when the submit button is clicked, then javascript is what actually sends the submit request. The thank you could actually be part of the original page, but initially hidden. When the submit click action occurs, just change the display status of the thank you.

    Another option, depending on how the feedback.php normally handles response to a submission, is to display the thank you as part of the response. This way, if there are any issues with the submission, an error message can be sent instead of thank you, since “thank you” sort of implies everything was accepted without any issues.

Viewing 1 replies (of 1 total)
  • The topic ‘Lizard Themes Contact Form Redirect’ is closed to new replies.