Answers.Body: <p><a href="https://civicrm.org/blog/stoob/using-only-jquery-and-civicrm-to-create-members-only-pricing" rel="nofollow">https://civicrm.org/blog/stoob/using-only-jquery-and-civicrm-to-create-members-only-pricing</a></p>
  
  <p>I used the technique on this page modified with something like this:</p>
  
  <pre><code>if($('#B').length){
     $('#A').hide();
  }
  </code></pre>
  
  <p>So if an anonymous user views the form, a block prints. If that block is on the page, hide the price set option which would reveal member pricing. Its not "secure" but in our case we would just contact someone who cheated and ask them to become a member, so its almost a marketing opportunity ;)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-30T22:24:15.867Z
Answers.Text: That's a clever way to get that done - thank you reporting back!
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-31T22:05:18.443Z
Answers.LastActivityDate: 2016-05-31T22:05:18.443Z
Answers.UserDisplayName: Zachary
Body: <p>Currently I have a Membership Options price set on my registration form. It is a radio button widget, showing the available options.</p>
  
  <p>I also have some Javascript running that will show a Non-Member priceset field by default, and if they select a Membership option it will .hide() that section and .show()the Members Only Pricing section.</p>
  
  <p>In this paradigm, the currently logged in user who is already a Member has to do something like choose an option "I am already a Member" to see the correct price set options. This relies on a trust model.</p>
  
  <p>How can I show or hide a price set based on if someone is a logged in member?</p>
  
  <p>EDIT: The reason I did not use CiviDiscount is that AFAIK discounts can't be 'stacked' so if I auto apply a discount to price set options based on Membership, then a user can not enter an additional discount code and have them both work.</p>
  
Tags: <civievent><civimember>
Title: Show/Hide a Price Set Section based on Membership
ThreadText: # Show/Hide a Price Set Section based on Membership
  
  (Asked by: username_0 on 2016-05-31)
  
  Currently I have a Membership Options price set on my registration form. It is a radio button widget, showing the available options.
  
  I also have some Javascript running that will show a Non-Member priceset field by default, and if they select a Membership option it will .hide() that section and .show()the Members Only Pricing section.
  
  In this paradigm, the currently logged in user who is already a Member has to do something like choose an option "I am already a Member" to see the correct price set options. This relies on a trust model.
  
  How can I show or hide a price set based on if someone is a logged in member?
  
  EDIT: The reason I did not use CiviDiscount is that AFAIK discounts can't be 'stacked' so if I auto apply a discount to price set options based on Membership, then a user can not enter an additional discount code and have them both work.
  
  **Tags:** civievent, civimember
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-05-31. Score: 1
  
  https://civicrm.org/blog/stoob/using-only-jquery-and-civicrm-to-create-members-only-pricing
  I used the technique on this page modified with something like this:
  if($('#B').length){
     $('#A').hide();
  }
  
  So if an anonymous user views the form, a block prints. If that block is on the page, hide the price set option which would reveal member pricing. Its not "secure" but in our case we would just contact someone who cheated and ask them to become a member, so its almost a marketing opportunity ;)
  
  > **Comments:**
  > **username_1**: That's a clever way to get that done - thank you reporting back!  
  
  ---
  
  