Copy link to clipboard
Copied
I have a situation where I have pricing options for an event: - early bird member and non member pricing, and standard member and non member pricing.
I've approached it this way which will get the right amount into the form field but how do I extract the selected amount from the form so I can process the amount?
<!--calculate amount to bill-->
<!--if there is no early bird date-->
{% if eb-date == 0 -%}
<label for="CAT_Custom_20133606">Select Membership Option <span class="req">*</span></label><br />
<select name="CAT_Custom_20133606" id="CAT_Custom_20133606" class="cat_dropdown">
<option value=>-- Please select --</option>
<option value=>Members : ${{cost-members}}</option>
<option value=>Non Members : ${{cost-non-members}}</option>
</select><br />
<!--if early bird pricing current-->
{% elseif globals.site.dateNow < eb-date -%}
<label for="CAT_Custom_20133606">Select Membership Option <span class="req">*</span></label><br />
<select name="CAT_Custom_20133606" id="CAT_Custom_20133606" class="cat_dropdown">
<option value=>-- Please select --</option>
<option value=>Members : ${{cost-members-eb}}</option>
<option value=>Non Members : ${{cost-non-members-eb}}</option>
</select><br />
<!--else today is after the early bird date-->
{% else -%}
<label for="CAT_Custom_20133606">Select Membership Option <span class="req">*</span></label><br />
<select name="CAT_Custom_20133606" id="CAT_Custom_20133606" class="cat_dropdown">
<option value=>-- Please select --</option>
<option value=>Members : ${{cost-members}}</option>
<option value=>Non Members : ${{cost-non-members}}</option>
</select><br />
{% endif -%}
Copy link to clipboard
Copied
You will need to use javascript to populate the "Amount" field based on current selection.
Copy link to clipboard
Copied
And fix your output so you have correct HTML so you have the prices in the value portion of the options.