Ajouter un commentaire

Contextual filter is limited to one parameter which means you cannot provide many say colorIDs separated with « + » or « , ». But Views is not limited to one contextual filter which means you can create multiple contextual filter. In my example, say I want to add a third filter « price », in order to get my used-only colors I will now need two contextual filters : shape and price.

However, Drupal Ajax API's callback function will only « recreate » one item of the form. So if you want, say that both your color and shape filters to update on change of the price filter, you will not be able to recreate both.

I actually do have a workaround for that : recreate the whole form instead using return $form; instead of return $form['colors']; and change your ajax wrapper so that it actually is the whole form instead of one filter only.

Hope I answered your question.