Examples

Simple example

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">

{!-- ReCaptcha support --}
{exp:reinos_email_form:init_recaptcha}

{exp:reinos_email_form:form
    required_fields="name|emailaddress"
}
    <div class="container">
        <div class="row">
            <div class="col">
                <div class="form-group">
                    <label for="name">Name</label>
                    {name:error}
                    <input type="text" class="form-control" id="name" placeholder="Your name" value="{name:value}" name="name">
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col">
                <div class="form-group">
                    <label for="emailaddress">Email address</label>
                    {emailaddress:error}
                    <input type="email" class="form-control" id="emailaddress" placeholder="name@example.com" value="{emailaddress:value}" name="emailaddress">
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col">
                <div class="form-group">
                    <label for="message">Message</label>
                    {message:error}
                    <textarea class="form-control" id="message" rows="3" name="message">{message:value}</textarea>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col">
                {if captcha}
                    <span style="color:red;">{captcha_error}</span><br>
                    {captcha}<br /> 
                    <input type="text" name="captcha" value="" maxlength="20" />
                {/if}

                {!-- repactcha should be enabled in the email_form CP and the tag {exp:reinos_email_form:init_recaptcha} shoud be added to the head --}
                {if recaptcha}
                    <span style="color:red;">{recaptcha_error}</span><br>
                    {recaptcha}
                {/if}
            </div>
        </div>
        <div class="row">
            <div class="col">
                <button type="submit" class="btn btn-primary">Submit</button>
            </div>
        </div>
    </div>

    {email_template
       to:name="John Doe"
       to:email="test@example.nl"
       from:name="William Doe"
       from:email="test@no-example.com"
        subject="Test email"
    }
        This email is sent to {to:name}. 
        The following field, that are declared inside the form can be used inside this template. 

        name: {name}
        email: {emailaddress}
        message: {message}
    {/email_template}

    {email_template
       to:name="John Doe"
       to:email="test@example.nl"
       from:name="William Doe"
       from:email="test@no-example.com"
       subject="Test email"
    }
        You can set as many templates as you want.
    {/email_template}

{/exp:reinos_email_form:form}