Skip to main content

adding postal code field

We'd like to be able to sort by zip code, so I tried separate the elements of the address. 

I changed this:

<p><label for="signup_submitted_address">Address (Street, City, State, Postal code)</label><br>{% text_field "submitted_address", class:"text" %}</p>  

To this:

<p><label for="signup_submitted_address">Address (Street)</label><br>{% text_field "submitted_address", class:"text" %}</p>  

<p><label for="signup_submitted_city">City (City)</label><br>{% text_field "submitted_city", class:"text" %}</p>  

<p><label for="signup_submitted_state">State (State)</label><br>{% text_field "submitted_state", class:"text" %}</p>  

<p><label for="signup_submitted_postal_code">Postal Code (Postal code)</label><br>{% text_field "submitted_postal_code", class:"text" %}</p>  

City, State, and Postal Code, then all show up as Liquid error: not valid field.

Could you please tell me the correct way to add those? 

If it is not possible, wouldn't it be fairly easy for Nation Builder to add those fields as option?  I'm sure we are not the only website that would like to be able to separate out that info.  thanks Dan McClain

Official response from

NationBuilder automatically parses the addresses entered into the standard "Address" field, separating out the Street, City, State (or Province!) and Postal Code. Within your Control Panel, you can then use the Advanced Search to filter People by their Postal Code if you choose.

If your aim is to only collect people's Postal Code information, you need only edit the template so that the <label> element describes the field as "Postal Code", rather than "Address (Street, City, State, Postal code)". NationBuilder will see that the data in the field is a Postal Code and log it accordingly.

Share this post

Showing 5 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.