Answers.Body: <p>Form submissions will always remove the parameters because they are now in $_POST and for example keeping &quot;reset=1&quot; would mean the form would reset and wouldn't get processed fully. So not just cividiscount. Some forms redirect to a different url and might add some parameters but that's specific to the form.</p>
  <p>lcMessages is a bit special and yes maybe it needs some extra handling.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-27T13:31:39.260Z
Answers.LastActivityDate: 2021-05-27T13:31:39.260Z
Answers.UserDisplayName: Demerit
Body: <p>A typical event URL looks like this:</p>
  <ul>
  <li><a href="https://dmaster.demo.civicrm.org/civicrm/event/register?reset=1&amp;id=3" rel="nofollow noreferrer">https://dmaster.demo.civicrm.org/civicrm/event/register?reset=1&amp;id=3</a></li>
  </ul>
  <p>But when you apply a discount code, the page is refreshed and the url parameters are removed:</p>
  <ul>
  <li><a href="https://dmaster.demo.civicrm.org/civicrm/event/register" rel="nofollow noreferrer">https://dmaster.demo.civicrm.org/civicrm/event/register</a></li>
  </ul>
  <p>This can lead to unexpected behavior when your url contains e.g. lcMessages, to force civi in a specific language.</p>
  <p>Does anyone know why CiviDiscount removes these query parameters?</p>
  
Tags: <cividiscount>
Title: Why does CiviDiscount remove the url parameters after a discount code is applied?
ThreadText: # Why does CiviDiscount remove the url parameters after a discount code is applied?
  
  (Asked by: username_0 on 2021-05-27)
  
  A typical event URL looks like this:
  
  * <https://dmaster.demo.civicrm.org/civicrm/event/register?reset=1&id=3>
  
  But when you apply a discount code, the page is refreshed and the url parameters are removed:
  
  * <https://dmaster.demo.civicrm.org/civicrm/event/register>
  
  This can lead to unexpected behavior when your url contains e.g. lcMessages, to force civi in a specific language.
  
  Does anyone know why CiviDiscount removes these query parameters?
  
  **Tags:** cividiscount
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-05-27. Score: 2 | Accepted answer
  
  Form submissions will always remove the parameters because they are now in $\_POST and for example keeping "reset=1" would mean the form would reset and wouldn't get processed fully. So not just cividiscount. Some forms redirect to a different url and might add some parameters but that's specific to the form.
  
  lcMessages is a bit special and yes maybe it needs some extra handling.
  
  
  ---
  
  