Skip to content

Instantly share code, notes, and snippets.

@isralduke
Created December 28, 2015 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isralduke/e11f97ec9a1ec7568970 to your computer and use it in GitHub Desktop.
Save isralduke/e11f97ec9a1ec7568970 to your computer and use it in GitHub Desktop.
Statamic Replace Spaces in Filename URL
https://github.com/pixelfear/Statamic-Replace
<p><b>Name:</b> {{ first }} {{ last }}</p>
<p><b>Company:</b> {{ company }}</p>
<p><b>Email:</b> {{ email }}</p>
<p><b>Phone:</b> {{ phone }}</p>
<p><b>Brief Description of Project:</b> {{ description }}</p>
<p>
<b>File:</b> <a href="{{ _site_url }}{{ replace find=" " replace="%20" }}{{ filedoc }}{{ /replace }}" target="_blank">
{{ _site_url }}{{ replace find=" " replace="%20" }}{{ filedoc }}{{ /replace }}
</a>
</p>
submission_save_path: _forms/submissions/estimate-requests/
upload_destination: assets/filedoc/
allowed:
- first
- last
- company
- email
- phone
- description
- filedoc
honeypot: title
email:
to: isral@stundesign.com
from: "{{ email }}"
subject: Website Estimate Request
automagic: true
html_template: website_estimate_email
control_panel:
fields:
- first
- last
- company
- email
- phone
metrics:
-
type: count
field: company
label: Estimate Requests
<div class="ninja-forms-form-wrap">
{{ raven:form formset="estimates" attr="id:ninja_forms_form_5|class:ninja-forms-form" files="true" }}
<label for="first">First Name</label>
<div class="field-wrap"><input id="first" name="first" type="text" value="{{ value:first }}"></div>
<label for="last">Last Name</label>
<div class="field-wrap"><input id="last" name="last" type="text" value="{{ value:last }}"></div>
<label class="your-job-title" for="title">Title</label>
<div class="field-wrap your-job-title"><input id="title" name="title" type="text" value="{{ value:title }}" class="your-job-title"></div>
<label for="company">Company</label>
<div class="field-wrap"><input id="company" name="company" type="text" value="{{ value:company }}"></div>
<label for="email">Email</label>
<div class="field-wrap"><input id="email" name="email" type="email" value="{{ value:email }}"></div>
<label for="phone">Phone</label>
<div class="field-wrap"><input id="phone" name="phone" type="tel" value="{{ value:phone }}"></div>
<label for="description">Brief Description of Project</label>
<div class="field-wrap"><input id="description" name="description" type="text" value="{{ value:description }}"></div>
<label for="filedoc">File Upload</label>
<div class="field-wrap"><input id="filedoc" name="filedoc" type="file" value="{{ value:filedoc }}"></div>
<input id="submit" name="submit" type="submit" class="ninja-forms-field greatsubmit">
{{ /raven:form }}
<p id="successMessage" class="">
Thanks! We&rsquo;ll be in touch soon.
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment