Quantcast
Viewing all articles
Browse latest Browse all 295783

Wrong triggering element is detected when the clicked button has a unique #name but a label that was changed client-side

I fall into problem that if some of buttons changed on client side and form has several submit buttons,
first button will be selected as $form_state['triggering_element'].

There is a related topic for D8 to rely on #name of buttons and ensure that #name is unique within form.
What i want to make with this patch is just backport of same idea.

If button was not identified by #value instead of just take first from buttons, just try to look up within POST data by button's #name if it exists.
Advantage of this approach that all backward compatibility supported.


Viewing all articles
Browse latest Browse all 295783


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>