Bold Memberships currently supports text and multi-line text inputs for custom registration fields such as size and color. With some slight changes to the liquid code on your theme, you can create a dropdown menu for your custom registration fields.
Note: This customization involves adjusting some liquid code in your theme. If you are not comfortable with completing this on your theme, one of our partners could create this for you as a paid customization on your store. Please request this through HeyCarson via this form.
Setup
To create dropdown menus for custom registration fields, please follow these steps:
-
From the Shopify admin, select Apps.
-
Select Recurring Memberships.
-
Select Plans.
-
Select Settings (the gear icon) next to the plan with which you want to use drop-downs.
-
Select Edit.
-
Note the Plan Tag; this is used later.
-
Note the order of the Registration Fields; this is used later.
Note: Your first custom field is number 1, the second custom field is number 2, etc.
-
From Shopify's admin, select Online Store.
-
Select Actions.
-
Select Edit code.
-
Under "Templates", select page.liquid.
-
Copy and paste this code at the end of the file:
<!--Bold Membership Options--> <script> jQuery(window).load(function(){ //Registration Field Customization setTimeout(function(){ //script settings var planTag = 'Plan Tag'; var fieldNumber = 2; var required = true; //create dropdown var field = jQuery('#customFields_' + planTag).find('input').eq(fieldNumber - 1); var field_id = field.attr('value_id'); field.replaceWith('<select id="field_' + field_id + '" value_id="' + field_id + '" name="n_' + field_id + '" class="answer' + (required == true?' required':'') + '"></select>'); }, 1000); }); </script> <!--End Membership Options-->
-
Under "//script settings", change Plan Tag to the tag you noted in step 7.
-
Next to "var fieldNumber", change 2 to the field number.
-
Next to "var required", change or leave true.
Note: true means the field is required, false means it is optional.
-
above }, 1000); paste this code for the first value for the drop-down:
//create dropdown option jQuery('#field_' + field_id).append(jQuery('<option>', { value: 'Silver', text: 'I would like Silver!' }));
-
Change "value" to the first value for the drop-down.
-
Change "text" to the display text for the first drop-down.
-
Repeat steps 17 - 19 for each drop-down box value.
-
Select Save.
Note: If you have multiple fields you wish to change into drop-down menus you can repeat these steps for each field.