Created
October 27, 2020 22:37
-
-
Save viktormorales/e3ed8b5b6163052db50626ed82ebfe5d to your computer and use it in GitHub Desktop.
WordPress: Formulario horizontal con Contacto Form 7 y Bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'frontend_scripts' ); | |
function frontend_scripts() | |
{ | |
wp_enqueue_script('jquery'); | |
/* Popper & Bootstrap */ | |
wp_enqueue_script('popper', 'https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js', array('jquery'), false, true); | |
wp_enqueue_script('bootstrap', 'https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js', array('jquery'), false, true); | |
wp_enqueue_style('bootstrap', 'https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css', false, false); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form-group"> | |
<label for="name" class="col-md-4 control-label">Nombre (obligatorio)</label> | |
<div class="col-md-8"> | |
[text* your-name class:form-control id:name] | |
</div> | |
</div> | |
<div class="form-group"> | |
<label for="email" class="col-md-4 control-label">Correo electrónico (obligatorio)</label> | |
<div class="col-md-8"> | |
[email* your-email class:form-control id:email] | |
</div> | |
</div> | |
<div class="form-group"> | |
<label for="message" class="col-md-4 control-label">Mensaje (obligatorio)</label> | |
<div class="col-md-8"> | |
[textarea* your-message class:form-control id:message] | |
</div> | |
</div> | |
<div class="form-group"> | |
<div class="col-md-offset-2 col-md-10"> | |
[submit id:send class:btn class:btn-primary "Enviar"] | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment