I have an events calendar clone with date and taxonomy arguments, and I created a taxonomy-based view ("event-type-picker") that I'm hoping can be used to manipulate arguments. I created views-view--event-type-picker.tpl.php and views-view-fields--event-type-picker.tpl.php to set tids as checkbox values and to place them inside a form, and now I'm wrestling with how to pass my (sometimes multiple) checkbox values to the URL.

I'm currently using Javascript, but no matter what I do to manipulate my value - for example, 36 - it won't be divorced from "?event=36" when I send it to the URL, which the view won't parse; it needs to be just the number 36. I have Clean URLs turned on - could that be causing it?

Javascript

function submitForm() {
	var jsvar = document.FormName.event.value;
	this.action = window.location + jsvar;
}

Form field for checkbox

<input type="checkbox" class="checkbox" id="f25" name="event" value="25">
<span class="field-content">Selection</span>

So I guess this is half Javascript/Drupal question and half "is there a better way to do this" question.

Comments

dawehner’s picture

Status: Active » Fixed

I suggest you to use jquery to access form data.

This is a general javascript support question.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.