Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX] FAPI: Dropbuttons: Also support <input> (AJAX calls) for the '#links' items in '#type' => 'operations' #6594

Open
klonos opened this issue Jun 10, 2024 · 0 comments

Comments

@klonos
Copy link
Member

klonos commented Jun 10, 2024

This would help certain popular contrib projects, like Paragraphs, to standardize their UI instead of having to add cruft to implement their own solutions.

From comments in backdrop-contrib/paragraphs#62

@irinaz

@laryn , let me know where is good start to move forward to implement these features
wishilist for gin paragraph buttons

gin paragraph buttons in D10

@laryn

@irinaz If you look where those buttons are added, you can start a branch/PR for this ticket and test out converting them to Backdrop's "dropbutton" format. Look at $element['inner_actions'] inside paragraphs_field_widget_form_build().

@herbdool

The hitch is that the dropbutton library was built to work with the operations form field type (which creates a list of <a>) rather than <input> with submit handlers and ajax callbacks. I'm not sure if the latter can easily be converted to <a>.

There's a fuller answer here: https://stackoverflow.com/questions/18026951/drupal-ajax-call-from-click-of-a-link-in-form

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant