submitting a GET form with query string params and hidden params disappear

前端 未结 10 681
庸人自扰
庸人自扰 2020-11-22 02:22

Consider this form:

10条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 03:00

    I had a very similar problem where for the form action, I had something like:

    
        
    
    

    The button would get the user to the site, but the query info disappeared so the user landed on the home page rather than the desired content page. The solution in my case was to find out how to code the URL without the query that would get the user to the desired page. In this case my target was a Drupal site, so as it turned out /content/something also worked. I also could have used a node number (i.e. /node/123).

提交回复
热议问题