adjust section height and add field

Solved
Tourist
6 0 0

Hi, I'm building out oomomi.com with narrative theme.  trying to add newsletter code to the header so I can collect potential customer's email addresses and zip code near the top.  would appreciate response to two questions: 

 

1. as you can see, the newsletter section is taking up a huge amount of vertical space.  how can I minimize the height?  I tried this but doesn't help

.index-section {  padding-bottom:20px;  padding-top:20px;
}

 2. because my initial offering is going to be regional.  I'd like to collect zipcode at the same time as email address.   so I got the zip code field to display next to the email field.  however,  zipcode entered in the filed is not collected/stored after submission.  Similarly, I also tried to add zip code field to the contact form page.  zip code does not get captured in the email passed to me.  so I guess the zip code or any custom field need a backend data structure?  how do I add that to my code so it's stored or at least captured in the email to me as in the case of contact form.

 

Thanks!

0 Likes
Explorer
83 11 11

Hello @oomomi 

 

task 1) please check below link, you can change top and bottom padding.
http://prntscr.com/qg96wh

 

task 2) Please refer below documentation
https://help.shopify.com/en/themes/customization/forms/add-fields-to-your-contact-form

Still not satisfied!!! contact me
Is it good solution? Yes, please Like.
0 Likes
Tourist
6 0 0

Thanks.  I originally created the field following that page but as I mentioned, the field is not in the email Shopify sends.  Code below.  Can you tell if I’m missing something?

 

<label for="zip-code" class="label--hidden">Zip-code</label>

<input required class="required" id="zip-code" type="text" name="properties[_ZIP Code]" placeholder="ZIP Code" value= form[zip]>

0 Likes

Success.

Explorer
83 11 11

@oomomi 

Name should be 'contact[ZIP Code]'

Still not satisfied!!! contact me
Is it good solution? Yes, please Like.
1 Like
Tourist
6 0 0

thanks!  for some reason ' 'contact[ZIP]' also seems to work.  any difference?

0 Likes