0

Sample form

Copy and paste the following HTML into the form content type.

{{ fv.field('first_name').mandatory() }}
{{ fv.field('last_name').mandatory() }}
{{ fv.field('telephone').mandatory() }}
{{ fv.field('email').rule('email') }}
{{ fv.field('message').mandatory() }}
{{ fv.require_captcha() }} 
{{ fv.error_html }}

<form method="post" action="./" class="form">
    <fieldset> 

        <p class="form-field">
            <label for="first_name">First name</label>
            <input name="first_name" id="first_name" type="text" value="{{ fv.data.first_name }}" placeholder="First name">
        </p>        

        <p class="form-field">
            <label for="last_name">Last name</label>
            <input name="last_name" id="last_name" type="text" value="{{ fv.data.last_name }}" placeholder="Last name">
        </p>        

        <p class="form-field">
            <label for="telephone">Telephone</label>
            <input type="tel" name="telephone" id="telephone" value="{{ fv.data.telephone }}" placeholder="Telephone">
            <em>Optional</em>
        </p>        

        <p class="form-field">
            <label for="email">Email</label>
            <input type="email" name="email" id="email" value="{{ fv.data.email }}" placeholder="Email">
        </p>        

        <p class="form-field">
            <label for="message">Message</label>
            <textarea name="message" id="message" rows="5">{{ fv.data.message }}</textarea>
        </p>        

        <p class="form-field">
            <label for="captcha">Enter code shown</label>
            {{ fv.captcha }}
        </p>        

        <p class="form-field checkbox">
            <label for="opt_in">Check this box if you wish to receive further information from us in the future.</label>
            <input type="hidden" name="opt_in" value="0">
            <input type="checkbox" name="opt_in" id="opt_in" value="1"{{ fv.data.opt_in ? ' checked' : '' }}>
        </p>        

    </fieldset>
    <fieldset>
        <input value="Send" type="submit" class="button">
    </fieldset>
</form>




sample-form.txt

0 comments

Post is closed for comments.