• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

liquid and forms

Explorer ,
Aug 31, 2017 Aug 31, 2017

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 -%}    

TOPICS
Developer

Views

232

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 31, 2017 Aug 31, 2017

Copy link to clipboard

Copied

You will need to use javascript to populate the "Amount" field based on current selection.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 31, 2017 Aug 31, 2017

Copy link to clipboard

Copied

LATEST

And fix your output so you have correct HTML so you have the prices in the value portion of the options.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines