Crazy bug where just mobile Safari/Chrome when submitting on a page with a long URL/query string prints out some AJAX rather than posting as expected
Our problem is in the first line of that form: Our action
has got a bit too much packed into it.
<form data-nid="15294" action="/classes?field_discipline_tid=All&level=All&class-type=All&instructor=15051&field_age_group_tid=All&field_class_day_of_week_value=All&field_class_time_of_day_value=All&keyword=" method="post" id="uc-product-add-to-cart-form-15294" accept-charset="UTF-8" class="uc-out-stock-processed">
<input type="hidden" name="form_build_id" value="form-5LMsf5MdT7sDjG2lwg1VAB9ef9qbobnurTG3E6S7-8A">
<input type="hidden" name="form_id" value="uc_product_add_to_cart_form_15294">
</form>
Simply form-altering the action to /classes
or url("classes")
didn’t work any better than changing the HTML directly to that with inspector: We end up on that page, with nothing in the cart.
Same with changing the action to cart.
It needs to be submitted to self it seems?
Ah no you can just put a ‘#’ there.
This post, though not about that, happened to be doing that in the example and so helped me realize that simple option:
https://stackoverflow.com/questions/9940580/drupal-form-action