<commit_before>ContactForm for Craft
=====================

How to install and use:

1.  Place the contactform folder in your craft/plugins folder.
2.  Go to Settings->Plugins from your Craft control panel and enable the Contact Form plugin.
3.  Click on “Contact Form” to go to the plugin’s settings page.
4.  Enter the email address you would like the contact requests to be sent to.

Your contact form template can look something like this:

    {% macro errorList(errors) %}
        {% if errors %}
            <ul class="errors">
                {% for error in errors %}
                    <li>{{ error }}</li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endmacro %}

    <form method="post" action="" accept-charset="UTF-8">
        <input type="hidden" name="action" value="contactform/sendMessage">

        <h3><label for="fromEmail">From Email</label></h3>
        <input id="fromEmail" type="text" name="fromEmail">

        {% if message is defined %}
            {{ _self.errorList(message.getErrors('fromEmail')) }}
        {% endif %}

        <h3><label for="fromName">From Name</label></h3>
        <input id="fromName" type="text" name="fromName">

        {% if message is defined %}
            {{ _self.errorList(message.getErrors('fromName')) }}
        {% endif %}

        <h3><label for="subject">Subject</label></h3>
        <input id="subject" type="text" name="subject">

        {% if message is defined %}
            {{ _self.errorList(message.getErrors('subject')) }}
        {% endif %}

        <h3><label for="message">Message</label></h3>
        <textarea rows="10" cols="40" id="message" name="message"></textarea>

        {% if message is defined %}
            {{ _self.errorList(message.getErrors('message')) }}
        {% endif %}

        <input type="submit" value="Submit">
    </form>


Note that "fromName" and "subject" are both optional fields.  The only required ones are "fromEmail" and "message".<commit_msg>Update readme with 'successRedirectUrl'.<commit_after>ContactForm for Craft
=====================

How to install and use:

1.  Place the contactform folder in your craft/plugins folder.
2.  Go to Settings->Plugins from your Craft control panel and enable the Contact Form plugin.
3.  Click on “Contact Form” to go to the plugin’s settings page.
4.  Enter the email address you would like the contact requests to be sent to.

Your contact form template can look something like this:

    {% macro errorList(errors) %}
        {% if errors %}
            <ul class="errors">
                {% for error in errors %}
                    <li>{{ error }}</li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endmacro %}

    <form method="post" action="" accept-charset="UTF-8">
        <input type="hidden" name="action" value="contactform/sendMessage">
        <input type="hidden" name="successRedirectUrl" value="success">

        <h3><label for="fromEmail">From Email</label></h3>
        <input id="fromEmail" type="text" name="fromEmail">

        {% if message is defined %}
            {{ _self.errorList(message.getErrors('fromEmail')) }}
        {% endif %}

        <h3><label for="fromName">From Name</label></h3>
        <input id="fromName" type="text" name="fromName">

        {% if message is defined %}
            {{ _self.errorList(message.getErrors('fromName')) }}
        {% endif %}

        <h3><label for="subject">Subject</label></h3>
        <input id="subject" type="text" name="subject">

        {% if message is defined %}
            {{ _self.errorList(message.getErrors('subject')) }}
        {% endif %}

        <h3><label for="message">Message</label></h3>
        <textarea rows="10" cols="40" id="message" name="message"></textarea>

        {% if message is defined %}
            {{ _self.errorList(message.getErrors('message')) }}
        {% endif %}

        <input type="submit" value="Submit">
    </form>


Note that “fromName” and “subject” are both optional fields.  The only required ones are “fromEmail” and “message”.

If you have a “successRedirectUrl” hidden input, the user will get redirected to it upon successfully sending the email.
{'fraction_non_alphanumeric': 0.15212740670311387, 'fraction_numerical': 0.008081768481102924, 'mean_word_length': 2.6527777777777777, 'pattern_counts': {'":': 0, '<': 62, '<?xml version=': 0, '>': 64, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7600993', 'n_tokens_mistral': 1239, 'n_tokens_neox': 1124, 'n_words': 355}