templates:
form: boltforms_form.twig
email: boltforms_email.twig
subject: boltforms_email_subject.twig
files: boltforms_file_browser.twig
recaptcha:
enabled: false
label: "Please enter the reCaptcha text to prove you're a human"
public_key: ''
private_key: ''
error_message: "The CAPTCHA wasn't entered correctly. Please try again."
theme: clean
csrf: true
uploads:
enabled: true # The global on/off switch for upload handling
base_directory: /files/attachment/ # Outside web root and writable by the web server's user
filename_handling: prefix # Can be either "prefix", "suffix", or "keep"
management_controller: true # Enable a controller to handle browsing and downloading of uploaded files
debug:
enabled: false
address: [email protected]
contact:
notification:
enabled: true
debug: false
subject: new inquiry
from_name: notifier # A field name, specified in the fields: section below
from_email: [email protected] # A field name, specified in the fields: section below
replyto_name: name # A field name, specified in the fields: section below
replyto_email: email # A field name, specified in the fields: section below
to_name: aa # Must be valid text
to_email: [email protected] # Must be valid email address
cc_name: someone
cc_email: [email protected]
attach_files: true
templates:
form: partials/_contact_form.twig
email: partials/_contactform_email.twig
subject: partials/_contactform_email_subject.twig
feedback:
success: Message submission sucessful
error: There are errors in the form, please fix before trying to resubmit
fields:
name:
type: text
options:
required: true
label: Name
attr:
placeholder: Your name...
constraints: [ NotBlank, {Length: {'min': 3}} ]
email:
type: email
options:
required: true
label: Email address
attr:
placeholder: Your email...
constraints: [ NotBlank, Email ]
message:
type: textarea
options:
required: true
label: Your message
attr:
placeholder: Your message...
class: myclass
upload:
type: file
options:
required: false
label: Attachment
remote_ip:
type: hidden
options:
label: false
event:
name: server_value
params:
key: REMOTE_ADDR
submit:
type: submit
{% form_theme form 'boltforms_custom.twig' %}
{% block boltforms_css %}
<link href="{{ app.paths.extensions }}vendor/bolt/boltforms/css/boltforms.css" rel="stylesheet" type="text/css" />
{% endblock boltforms_css %}
{% if debug %}
<p class="boltform-error">[Debug] Notification debug mode enabled!</p>
{% endif %}
{% if error and app.request.get(formname) %}
<p class="boltform-error">{{ error }}</p>
{% endif %}
{% if message and app.request.get(formname) %}
<p class="boltform-message">{{ message }}</p>
{% endif %}
{% if not sent %}
{{ html_pre }}
{% if recaptcha.enabled and recaptcha.theme|default('clean') %}
<script>
var RecaptchaOptions = {
theme : '{{ recaptcha.theme }}'
};
</script>
{% endif %}
{{ form_start(form, {'attr': {'name': formname, 'class': 'pure-form pure-form-aligned contact-form'}}) }}
{{ form_errors(form) }}
<fieldset>
<span>We’d love to hear from you and answer any questions you may have.</span>
{% for key, value in fields %}
{% if value.config.name != 'submit' %}
<div class="pure-control-group {% if form[key].vars.attr.class is defined %} boltforms-{{ form[key].vars.attr.class }}-row{% endif %}">
{{ form_label(form[key]) }}
{{ form_errors(form[key]) }}
{{ form_widget(form[key]) }}
</div>
{% endif %}
{% endfor %}
{% if recaptcha.enabled %}
{% if not recaptcha.valid %}
<ul class="boltform-error">
<li class="boltform-errors">{{ recaptcha.error_message }}</li>
</ul>
{% endif %}
<div class="boltform-row">
<label for="form_message" class="required">{{ recaptcha.label|trans({}, translation_domain) }}</label>
<script src="https://www.google.com/recaptcha/api.js?hl={{ htmllang() }}" async defer></script>
<div class="g-recaptcha" data-sitekey="{{ recaptcha.public_key }}"></div>
</div>
{% endif %}
<div class="pure-controls {% if form.submit.vars.attr.class is defined %} boltforms-{{ form.submit.vars.attr.class }}-row{% endif %}">
{{ form_widget(form.submit, {'attr': {'class': 'pure-button pure-button-primary'}}) }}
</div>
</fieldset>
{{ form_end(form) }}
{% else %}
{{ html_post }}
{% endif %}
vagrant@vagrant-ubuntu-trusty-64:~/www/jdhandbagfactory.com/public/files$ ll
total 968
drwxrwxrwx 5 vagrant www-data 4096 Dec 28 03:54 ./
drwxrwxrwx 8 vagrant www-data 4096 Dec 16 03:28 ../
drwxrwxrwx 2 vagrant www-data 4096 Dec 17 06:12 2015-12/
-rwxrwxrwx 1 vagrant www-data 67817 Nov 29 2014 agriculture-cereals-field-621.jpg*
-rwxrwxrwx 1 vagrant www-data 34374 Nov 29 2014 alarm-clock-gold-hands-of-a-clock-1778.jpg*
-rwxrwxrwx 1 vagrant www-data 51381 Nov 29 2014 analog-camera-photography-vintage-1844.jpg*
-rwxrwxrwx 1 vagrant www-data 50441 Nov 29 2014 apple-desk-iphone-2750.jpg*
-rwxrwxrwx 1 vagrant www-data 75559 Nov 29 2014 architecture-books-building-2757.jpg*
drwxrwxrwx 2 www-data www-data 4096 Dec 28 09:43 attachment/
-rwxrwxrwx 1 vagrant www-data 47377 Nov 29 2014 bell-bills-cash-register-2738.jpg*
-rwxrwxrwx 1 vagrant www-data 53149 Nov 29 2014 blur-breakfast-coffee-271.jpg*
-rwxrwxrwx 1 vagrant www-data 45555 Nov 29 2014 blur-flowers-home-1093.jpg*
drwxrwxrwx 2 vagrant www-data 4096 Nov 13 09:24 brands/
-rwxrwxrwx 1 vagrant www-data 98747 Nov 29 2014 building-frame-garage-1599.jpg*
-rwxrwxrwx 1 vagrant www-data 46019 Nov 29 2014 california-foggy-golden-gate-bridge-2771.jpg*
-rwxrwxrwx 1 vagrant www-data 56656 Nov 29 2014 carrot-cooking-eat-1398.jpg*
-rwxrwxrwx 1 vagrant www-data 39299 Nov 29 2014 configure-disc-jockey-disco-1504.jpg*
-rwxrwxrwx 1 vagrant www-data 94855 Nov 29 2014 food-fruit-orange-1286.jpg*
-rwxrwxrwx 1 vagrant www-data 102211 Nov 29 2014 garden-gardening-grass-589.jpg*
-rwxrwxrwx 1 vagrant www-data 191 Jul 24 2014 .htaccess*
-rwxrwxrwx 1 vagrant www-data 4 Jul 24 2014 index.html*
-rwxrwxrwx 1 vagrant www-data 65909 Nov 29 2014 keyboard-old-technology-2318.jpg*