Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

chapmanf16

Member
  • Content Count

    1
  • Joined

  • Last visited

  1. Site URL: https://www.americangardenhouse.com/products/o-sweet-viola I'm trying to create an a conditional form (in this case it would be on the additional product form). After selecting the product variants and then clicking "Add to Cart" the popup product form displays with two radio inputs. If "Yes" is selected, I want the additional product form fields to display (currently hidden CSS) and if "No" then an html message to appear prompting the customer to click the product form "Add to Cart" button. <style> #textarea-yui_3_17_2_1_1585523845981_190824, #address-yui_3_17_2_1_1585523845981_456969, #email-yui_3_17_2_1_1585523845981_459960, #phone-yui_3_17_2_1_1585523845981_461162 { display: none; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $('#radio-yui_3_17_2_1_1585593158170_218442 input:radio').click(function() { selection = $(this).val(); if (selection == 'Yes') { $('.form-item').show; } else if (selection == 'No') { $('form').html('Maybe Next Time. Please complete adding this product to your card by clicking "Add to Cart"'); } }); </script> The CSS is loaded using code injector into the page header and the script is in the footer. AJAX is currently disabled. Problem is, the click event is not working. Any help would be greatly appreciated. Thank you!
×
×
  • Create New...