Body: <p>I have a Drupal 9 CiviCRM Webform with a Membership field.</p>
  <p><a href="https://i.sstatic.net/NFgVl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NFgVl.png" alt="Membership field" /></a></p>
  <p>I added a membership in Civi called &quot;Select Your Membership&quot; and have made that the default membership when a user selects their membership on the Webform. I am not letting the form be submitted if that membership is selected. It just gives me a good default value.</p>
  <p>If the membership field is on a page then the default is always saved as the membership type even when I select another membership.</p>
  <p><a href="https://i.sstatic.net/Rl7PZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Rl7PZ.png" alt="enter image description here" /></a></p>
  <p>If the field is outside of the page container then it works correctly, and the membership selected in the Webform is reflected in CiviCRM. The data is also incorrect when viewed on the Webform results tab.</p>
  <p>Can the membership selection field be shown on a specific page or does it need to be outside of the containers?</p>
  <p>Thanks,</p>
  <p>Josh</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-08T22:33:06.777Z
Comments.Text: This sounds like a nasty workaround for getting the option to not have a default, is that right?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-09T03:29:44.533Z
Comments.Text: @petednz-fuzion it is a nasty workaround but the issue is not with the workaround. The workaround itself works well.  If I let a different membership  be the default then it will use that membership rather than the one selected.  The issue is if the membership is inside a page then it just uses the default rather than the membership selected.  Thanks!
Comments.UserDisplayName: Josh
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-09T10:46:17.260Z
Comments.Text: ok. yes i gather you have found another bug. just for completeness re the workaround my suggestion was meant to leave nothing set as default.
Comments.UserDisplayName: petednz - fuzion
Tags: <civimember><webform-civicrm><drupal-9>
Title: Default Value Used Rather Than Value Selected
ThreadText: # Default Value Used Rather Than Value Selected
  
  (Asked by: username_0 on 2021-07-08)
  
  I have a Drupal 9 CiviCRM Webform with a Membership field.
  
  [![Membership field](https://i.sstatic.net/NFgVl.png)](https://i.sstatic.net/NFgVl.png)
  
  I added a membership in Civi called "Select Your Membership" and have made that the default membership when a user selects their membership on the Webform. I am not letting the form be submitted if that membership is selected. It just gives me a good default value.
  
  If the membership field is on a page then the default is always saved as the membership type even when I select another membership.
  
  [![enter image description here](https://i.sstatic.net/Rl7PZ.png)](https://i.sstatic.net/Rl7PZ.png)
  
  If the field is outside of the page container then it works correctly, and the membership selected in the Webform is reflected in CiviCRM. The data is also incorrect when viewed on the Webform results tab.
  
  Can the membership selection field be shown on a specific page or does it need to be outside of the containers?
  
  Thanks,
  
  username_0
  
  **Tags:** civimember, webform-civicrm, drupal-9
  
  > **Comments:**
  > **username_1**: This sounds like a nasty workaround for getting the option to not have a default, is that right?  
  > **username_0**: @petednz-fuzion it is a nasty workaround but the issue is not with the workaround. The workaround itself works well.  If I let a different membership  be the default then it will use that membership rather than the one selected.  The issue is if the membership is inside a page then it just uses the default rather than the membership selected.  Thanks!  
  > **username_1**: ok. yes i gather you have found another bug. just for completeness re the workaround my suggestion was meant to leave nothing set as default.  
  
  ---
  
  ## 0 answers
  
  