I'm trying to add several custom fields to our event sign-up page. It's a big conference, so we need to ask things like t-shirt size, housing arrangements, etc. I made a multiple choice custom people field housing_arrangements to test, but I've been totally unable to make it work.
My code
{% for cf in custom_fields.signup %}{% assign custom_field = cf[1] %}
{% assign custom_field_id = 'signup.custom_values.' | append: custom_field.slug %}{% if custom_field.slug contains "housing_arrangements" %}<div class="row-fluid">
<div class="span12">{% if custom_field.is_text? or custom_field.is_number? %}
<label for="event_rsvp_signup_custom_values_{{ custom_field.slug }}_custom">{{ custom_field.name }}</label>
{% text_field custom_field_id, class:"text" %}{% elsif custom_field.is_boolean? %}
<label class="checkbox" for="event_rsvp_signup_custom_values_{{ custom_field.slug }}_custom">{% check_box custom_field_id, class:"checkbox" %} {{ custom_field.name }}</label>{% elsif custom_field.is_multiple_choice? %}
<label for="event_rsvp_signup_custom_values_{{ custom_field.slug }}_custom">{{ custom_field.name }}</label>
{% collection_select custom_field_id, custom_fields.signup[custom_field.slug].multiple_choice_options, class:"select" %}
{% endif %}</div>
</div>{% endif %}
{% endfor %}
Error:
Housing ArrangementsLiquid error: undefined method `signup_custom_values' for OrderDrop:OrderDropI've tried a bunch of different things, as suggested in several other similar questions, but nothing I've tried has worked. It's getting the custom field, because it's posting the title, but then it can't actually post the selection part.
Hi Joe,
I did some testing and it appears that the custom fields for event pages work fine in the RSVP form, but not the "Order" form (which is used instead of the RSVP form when an event has tickets for purchase). For this reason, you will need to put the custom fields on the donation page that ticket buyers are brought to instead of on the event page itself. If you are using a generic donation page right now, I recommend creating a new donation page to use for this event only.
Showing 2 reactions
Sign in with
The following is my code:
First Option <br>
{% for cf in custom_fields.signup %}
{% assign custom_field = cf1 }
{ assign custom_field_id = ‘custom_values.’ | append: custom_field.slug }
<div class=“row-fluid”>
<div class=“span12”>
{ if custom_field.is_multiple_choice? }
{{ custom_field.name }}
{ collection_select custom_field_id, custom_fields.signup[custom_field.slug].multiple_choice_options, class:“select” }
{ endif %}
</div>
</div>
{% endfor %}
<br><br>
Second Option<br>
{{ request.current_signup.custom_values_for_display[‘lgba_2017_housing’] }}
<br><br>
Third Option<br>
{% collection_select “custom_values.lgba_2017_housing”, custom_fields.lgba_2017_housing.multiple_choice_options %}
<br>
Third Option B<br>
{% collection_select “custom_values.slug”, custom_fields.lgba_2017_housing.multiple_choice_options %}
<br>
Third Option C<br>
{% collection_select “custom_values.lgba_2017_housing”, custom_fields.slug.multiple_choice_options %}
<br><br>
Fourth Option<br>
{% collection_select “signup.custom_values.lgba_2017_housing”, custom_fields.signup.lgba_2017_housing.multiple_choice_options %}
<br>
Fourth Option B<br>
{% collection_select “signup.custom_values.slug”, custom_fields.signup.lgba_2017_housing.multiple_choice_options %}
<br>
Fourth Option C<br>
{% collection_select “signup.custom_values.lgba_2017_housing”, custom_fields.signup.slug.multiple_choice_options %}
<br><br>
Fifth Option<br>
{% for cf in custom_fields.signup }
{ assign custom_field = cf1 }
{ assign custom_field_id = ‘signup.custom_values.’ | append: custom_field.slug }
{ if custom_field.slug contains “lgba_2017_housing” }
<div class=“row-fluid”>
<div class=“span12”>
{{ custom_field.name }}
{ collection_select custom_field_id, custom_fields.signup[custom_field.slug].multiple_choice_options, class:“select” }
</div>
</div>
{ endif }
{ endfor %}
And the various errors I get
First Option
Housing Arrangements
Liquid error: undefined method `source’ for custom_values.lgba_2017_housing
Second Option
Second Option B
Third Option
Liquid error: undefined method `each’ for nil:NilClass
Third Option B
Liquid error: undefined method `each’ for nil:NilClass
Third Option C
Liquid error: undefined method `each’ for nil:NilClass
Fourth Option
Liquid error: undefined method `source’ for signup.custom_values.lgba_2017_housing
Fourth Option B
Liquid error: undefined method `source’ for signup.custom_values.slug
Fourth Option C
Liquid error: undefined method `each’ for nil:NilClass
Fifth Option
Housing Arrangements
Liquid error: undefined method `source’ for signup.custom_values.lgba_2017_housing