Updates contact form fields
Torey Heinz
committed Jan 03, 2019
commit 2c49462594f39c52f1bf953fc57fcd407cd16aca
Showing 6
changed files with
30 additions
and 23 deletions
app/content_types/customer_messages.yml
+3
-0
| @@ | @@ -37,6 +37,9 @@ display_settings: |
| # A list describing each field | |
| fields: | |
| + | - captcha: |
| + | required: true |
| + | type: string |
| - name: # The lowercase, underscored name of the field | |
| label: Name # Human readable name of the field | |
| type: string | |
app/content_types/project_requests.yml
+10
-6
| @@ | @@ -49,47 +49,50 @@ fields: |
| - email: # The lowercase, underscored name of the field | |
| label: Email # Human readable name of the field | |
| type: string | |
| - | required: false |
| + | required: true |
| localized: false | |
| - phone: # The lowercase, underscored name of the field | |
| label: Phone # Human readable name of the field | |
| type: string | |
| - | required: false |
| + | required: true |
| localized: false | |
| - address: # The lowercase, underscored name of the field | |
| label: Address # Human readable name of the field | |
| type: string | |
| - | required: false |
| + | required: true |
| - city: # The lowercase, underscored name of the field | |
| label: City # Human readable name of the field | |
| type: string | |
| - | required: false |
| + | required: true |
| - state: # The lowercase, underscored name of the field | |
| label: State # Human readable name of the field | |
| type: string | |
| - | required: false |
| + | required: true |
| - zip: # The lowercase, underscored name of the field | |
| label: Zip # Human readable name of the field | |
| type: string | |
| - | required: false |
| + | required: true |
| - boat_year: | |
| label: Boat Year | |
| type: string | |
| + | required: true |
| - boat_length: | |
| label: Boat Length | |
| type: string | |
| + | required: true |
| - boat_brand: | |
| label: Boat Brand | |
| type: string | |
| + | required: true |
| - boat_model: | |
| label: Boat Model | |
| @@ | @@ -103,6 +106,7 @@ fields: |
| - marina_name: | |
| label: Marina Name | |
| type: string | |
| + | required: true |
| - slip_number: | |
| label: Dock/Slip Number | |
app/views/pages/contact.liquid
+1
-1
| @@ | @@ -122,7 +122,7 @@ editable_elements: |
| e.preventDefault(); | |
| $('.robot-warning').removeClass('hide') | |
| } else if (grecaptcha.getResponse().length > 250) { | |
| - | $('input#captcha')[0].val(grecaptcha.getResponse()) |
| + | $('input#captcha').val(grecaptcha.getResponse()) |
| } | |
| }); | |
| }); | |
app/views/pages/estimate.liquid
+1
-1
| @@ | @@ -46,7 +46,7 @@ editable_elements: |
| e.preventDefault(); | |
| $('.robot-warning').removeClass('hide') | |
| } else if (grecaptcha.getResponse().length > 250) { | |
| - | $('input#captcha')[0].val(grecaptcha.getResponse()) |
| + | $('input#captcha').val(grecaptcha.getResponse()) |
| } | |
| }); | |
| }); | |
app/views/snippets/estimate_form.liquid
+14
-14
| @@ | @@ -26,19 +26,19 @@ |
| <fieldset class="row collapse"> | |
| <div class="column small-6"> | |
| <label> | |
| - | City: |
| + | City:{% include 'required' %} |
| <input name="content[city]" required type="text" value="{{project_request.city}}"> | |
| </label> | |
| </div> | |
| <div class="column small-2"> | |
| <label> | |
| - | State: |
| + | State:{% include 'required' %} |
| <input name="content[state]" required type="text" value="{{project_request.state}}"> | |
| </label> | |
| </div> | |
| <div class="column small-4"> | |
| <label> | |
| - | Zip: |
| + | Zip:{% include 'required' %} |
| <input name="content[zip]" required type="text" value="{{project_request.zip}}"> | |
| </label> | |
| </div> | |
| @@ | @@ -49,19 +49,19 @@ |
| <fieldset class="row collapse"> | |
| <div class="column small-3"> | |
| <label> | |
| - | Year |
| + | Year{% include 'required' %} |
| <input name="content[boat_year]" required type="text" value="{{project_request.boat_year}}"> | |
| </label> | |
| </div> | |
| <div class="column small-3"> | |
| <label> | |
| - | Length |
| + | Length{% include 'required' %} |
| <input name="content[boat_length]" required type="text" value="{{project_request.boat_length}}"> | |
| </label> | |
| </div> | |
| <div class="column small-6"> | |
| <label> | |
| - | Brand |
| + | Brand{% include 'required' %} |
| <input name="content[boat_brand]" required type="text" value="{{project_request.boat_brand}}"> | |
| </label> | |
| </div> | |
| @@ | @@ -70,13 +70,13 @@ |
| <div class="column small-6"> | |
| <label> | |
| Model | |
| - | <input name="content[boat_model]" required type="text" value="{{project_request.boat_model}}"> |
| + | <input name="content[boat_model]" type="text" value="{{project_request.boat_model}}"> |
| </label> | |
| </div> | |
| <div class="column small-6"> | |
| <label> | |
| Name/Hull# | |
| - | <input name="content[boat_name]" required type="text" value="{{project_request.boat_name}}"> |
| + | <input name="content[boat_name]" type="text" value="{{project_request.boat_name}}"> |
| </label> | |
| </div> | |
| </fieldset> | |
| @@ | @@ -86,20 +86,20 @@ |
| <fieldset class="row collapse"> | |
| <div class="column small-6"> | |
| <label> | |
| - | Marina Name/Storage Unit |
| + | Marina Name/Storage Unit{% include 'required' %} |
| <input name="content[marina_name]" required type="text" value="{{project_request.marina_name}}"> | |
| </label> | |
| </div> | |
| <div class="column small-3"> | |
| <label> | |
| Building# | |
| - | <input name="content[building_number]" required type="text" value="{{project_request.building_number}}"> |
| + | <input name="content[building_number]" type="text" value="{{project_request.building_number}}"> |
| </label> | |
| </div> | |
| <div class="column small-3"> | |
| <label> | |
| Dock/Slip# | |
| - | <input name="content[slip_number]" required type="text" value="{{project_request.slip_number}}"> |
| + | <input name="content[slip_number]" type="text" value="{{project_request.slip_number}}"> |
| </label> | |
| </div> | |
| </fieldset> | |
| @@ | @@ -121,11 +121,11 @@ |
| </label> --> | |
| <label> | |
| <strong>Project Description:</strong>{% include 'required' %} | |
| - | <textarea class="autosize" name="content[project_description]" rows="6" required >{{project_request.project_description}}</textarea> |
| + | <textarea class="autosize" required name="content[project_description]" rows="6" required >{{project_request.project_description}}</textarea> |
| </label> | |
| <label> | |
| - | When would you like your project completed by? |
| - | <input name="content[completion_date]" type="text" > |
| + | When would you like your project completed by?{% include 'required' %} |
| + | <input name="content[completion_date]" required type="text" > |
| </label> | |
| <fieldset class="row medium-up-2"> | |
| <div class="column"> | |
app/views/snippets/required.liquid
+1
-1
| @@ | @@ -1 +1 @@ |
| - | <sup style="color: #7A3C19"><em>(required)</em></sup> |
| + | <strong style="color: #7A3C19">*</strong> |