html - Is it possible to remove a radio button group set to its default value from the get parameter list? -


this question getting "nice" short urls input form, "pure" html, when javascript off. form, gives user few choices, each in form of radio buttons, users alter @ 1 value default settings, or none @ all:

<form method=get action="form.html">     setting 1:     <input type="radio" name="val1" value="default1" checked>&nbsp;default value     <input type="radio" name="val1" value="alt1">&nbsp;alternative value     <input type="radio" name="val1" value="other1">&nbsp;other alternative value     <br>     setting 2:     <input type="radio" name="val2" value="default2" checked>&nbsp;default value     <input type="radio" name="val2" value="alt2">&nbsp;alternative value     ... </form> 

so, when user submits form, url this:

form.html?val1=default1&val2=alt2&val3=default3&val4=default4 

but want url following:

form.html?val2=alt2 

i aware of how achieve desired nice urls client side javascript. , aware how clean url using server side redirect in case, javascript off. there way achieve short , nice url without javascript , without server redirects, plain html? following 2

the problem though, @ least google tends "play around" forms, generating new urls, pushed backlog of google crawler needs crawl. because of number of urls in backlog , frequency, crawler requests urls, great help, if google starting final urls , not requiring 301 redirect.

my attempts remove val1=default1 parameter url without javascript/redirect have failed, though. example:

<input type="radio" name="val1" value="" checked>&nbsp;default value 

still puts "val1=" url. and

<input type="radio" name="val1" checked>&nbsp;default value 

results in "val1=on" in url. apparently, radio buttons have "on" default value.

any suggestions?

use method post

`<form method="post" action="form.html">` 

instead of method get

you nice url form.html instead of

form.html?val1=default1&val2=alt2&val3=default3&val4=default4

but have change coding of page(form.html here) handles form data , it.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -