hmmm, I went through all the open issues in ajax system, missed going through...

Contribution Date
Technology
Contribution Project
Contribution Details

hmmm, I went through all the open issues in ajax system, missed going through.

I would still like to have this one separate, reason is the place where I want it to be supported.

Imagine an address form on product page to check if delivery is possible, you select a country and do an ajax call to populate states based on the selected country but that ajax call loads the whole page even bypassing the render cache.

I wish if we can convert this:

$form['get_shipping_methods'] = [ '#type' => 'button', '#value' => $this->t('deliver to this address'), '#ajax' => [ 'callback' => [$this, 'getShippingMethods'], 'wrapper' => 'address_wrapper', ], '#submit' => [], '#weight' => -50, '#limit_validation_errors' => [ ['address'], ], ];

into:

$form['get_shipping_methods'] = [ '#type' => 'button', '#value' => $this->t('deliver to this address'), '#ajax' => [ 'callback' => ['route', 'module_name.get_shipping_methods'], 'wrapper' => 'address_wrapper', ], '#submit' => [], '#weight' => -50, '#limit_validation_errors' => [ ['address'], ], ];

And something similar for #element_validate

Contribution Author
Files count
0
Patches count
0