Hey i had the same problem and found a solution
I will write code that relates to your problem
HTML: (note, I'm not very experienced here, so there may be a mistake, but the basic structure is correct). Here we want to customize the "form action" and use method = GET
<form action="/webpage_name" method="GET"> <li> <label> <input type="checkbox" name="filters" value="first value"> <span>First Value</span> </label> </li> <li> <label> <input type="checkbox" name="filters" value="second value"> <span>Second Value</span> </label> </li> <input type="submit" name="save" value="save"> </form>
Python: the "all_filters" variable will take all the data from the "filters" variable from the bottle import request
@route('/webpage_name', method='GET') def function_grab_filter(): if request.GET.save: all_filters = request.GET.getall('filters') for ff in all_filters: fft = str(ff[0:])
Brad123
source share