I am following instructions here:
http://nationbuilder.com/how_to_create_custom_people_fields
on this page:
https://beyondzeroemissions.nationbuilder.com/admin/sites/2/pages/26/template
specifically line 55
{% collection_select "signup.custom_values.house_type", custom_fields.multiple_choice_options.house_type %}
causing this error:
Liquid error: undefined method `each' for nil:NilClass
http://energyfreedom-beyondzeroemissions.nationbuilder.com/pledge
I apologize for the confusion! I think you've been able to sort out the trouble you were having. After I published the page on how to create custom people fields, our engineering team did more work which caused the syntax for displaying multiple choice fields to change. I've updated the how to page to reflect those changes. Please let us know if you're still having difficulty.
In particular, to display a multiple choice custom field here is the Liquid code:
{% collection_select "signup.custom_values.slug", custom_fields.signup.slug.multiple_choice_options %}
Please let us know if you're still having difficulty.
Showing 9 reactions
Sign in with
Do this:
{% collection_select “custom_values.slug”, custom_fields.signup.slug.multiple_choice_options %}
“signup” on the page type I am is already assumed.
Page Type: Basic html page. (not signup)
Custom Field Type: People
Slug name: how_did_you_hear_about_us
Code snippet being used:
Full Error: Liquid error: undefined method `source’ for custom_values.signup.what_made_you_join
This is pretty much taken directly from the documentation. Has something changed? or has anyone found a work around for this.
Thanks!
Certified Architect
Thanks to your clarification, I was able to get it to work.
Would you happen to know how I can add a default option?
Thanks again!
{% collection_select “custom_values.slug”, custom_fields.signup.slug.multiple_choice_options %}
to see if that clears up the error?
Certified Architect
Any help would be appreciated. Thanks!
Liquid error: signup.custom_values.state is not a valid form field for Signup.
Certified Architect