SimpleForm FAQ
Have a question? The answers to the most frequently asked questions will help you learn more about the SimpleForm plugin and its features. Browse the topics below to find what you are looking for.
The simplest way to add a WordPress contact form
Have a question? The answers to the most frequently asked questions will help you learn more about the SimpleForm plugin and its features. Browse the topics below to find what you are looking for.
[simpleform]
You can wrap it into a html structure using the tag div and style it through the class o style attribute, like so:
<div style="max-width: 800px; margin: 0 auto;">[simpleform]</div>
wp_enqueue_style( 'sform-style' );
wp_enqueue_script( 'sform_form_script');
wp_enqueue_script( 'sform_public_script');
echo do_shortcode( '[simpleform]' );
Go to 'Pages' in the dashboard navigation menu, create a new page or choose an existing one, select the template where you embed the shortcode, then publish or update the page.function simpleform_postmeta( $post_id ) {
// Replace YOUR TEMPLATE FILE with the name of your template file (e.g. contact.php)
if ( 'YOUR TEMPLATE FILE' == get_post_meta( $post_id, '_wp_page_template', true ) ) {
add_post_meta( $post_id, 'simpleform', '[simpleform]', true );
} else {
delete_post_meta( $post_id, 'simpleform');
} }
add_action( 'save_post', 'simpleform_postmeta' );
Go to 'Pages' in the dashboard navigation menu, select the page to which you assigned the template and update.add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 );
function remove_default_stylesheet() {
wp_dequeue_style('sform-style');
wp_enqueue_style('sform-newstyle', get_stylesheet_directory_uri() . '/sform-style.css', false, '1.0');
}