Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Add 1 more field to contact form?

Home / Forums / Virtue Theme / Add 1 more field to contact form?

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
March 23, 2015 at 11:06 am

Hi Ben,

I want to add one more field to the contact field that. I want to add a ‘How did you hear about me?’ field.

When I added this
<p><label for="commentsText"><b><?php _e('How Did You Hear About Us?: ', 'virtue'); ?></b></label>
<textarea name="survey" id="commentsText" rows="10" class="required requiredField"><?php if(isset($_POST['How Did You Hear About Us?: '])) { if(function_exists('stripslashes')) { echo esc_textarea(stripslashes($_POST['How Did You Hear About Us?: '])); } else { echo esc_textarea($_POST['How Did You Hear About Us?: ']); } } ?></textarea>
<?php if(isset($commentError)) { ?><label class="error"><?php echo esc_html($commentError);?></label><?php } ?></p>

it did not work quite well. I know you are using javascript to have Error comments for the variable $commentError. What would I need to add to have another field?

Thanks,
Emre Bilgin

  • The forum ‘Virtue Theme’ is closed to new topics and replies.