In a form_alter hook I'm trying to target the buttons to add a new paragraph but can't seem to target the specific buttons. The buttons are multiple entity references with unlimited cardinality, but for my use case I would like for once one entity is chosen, only that entity can be chosen again in the repeater, which is why I'm trying to disable the other buttons. I want to allow unlimited cardinality but only one paragraph type to be chosen at a time. This works to unset the entire row of buttons...


But this does not work to target the specific button...


Any help or suggestions?

  • I don't understand exactly what you are trying to do, where, and how. In a form alter hook you try to target a button. To add a new paragraph. I don't get the connection. Can you please add more detailed info? 🙏🏻
    – leymannx
    Nov 9, 2022 at 20:25
  • Yes, in a form alter hook, I've updated my question.
    – Shawn W
    Nov 9, 2022 at 22:18


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.