Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300003

Views forms can't be used multiple times on the same page

$
0
0

ViewsForm::getFormId() constructs the form id from the view name and the display id.
If a view is repeated on the same page with different arguments (showing different cart orders in my case), the forms will clash cause the form id is the same.

Proposed solution:
DisplayPluginBase::elementPreRender() should pass $view->args to ViewsForm::create().
ViewsForm should store the arguments and use them in getFormId().
If there are no arguments, the logic stays the same, if there are arguments, we concat them and create a short hash.


Viewing all articles
Browse latest Browse all 300003

Latest Images

Trending Articles



Latest Images

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