- Status changed to RTBC
over 1 year ago 10:54am 15 March 2023 - 🇩🇪Germany Atropoides Hamburg
Tested with version 1.0.0-beta5. Worked great for me, thanks for the solution.
- 🇧🇷Brazil adinancenci
So, patch #5 have fixed some occurrences in one of our sites but in other forms it had the exact opposite effect, causing the bug to occur where once it was working just fine.
I tweaked patch #5, it worked for us. ( tested with 1.0.0-beta4 ).
- 🇧🇷Brazil adinancenci
Damn... can someone please rename the patch above to reflect the comment ?
- 🇪🇸Spain psf_ Huelva
#9 tested with version 1.0.0-beta6. Work for me.
In buildForm() I have:
$form['legal_links'] = [ '#type' => 'multivalue', '#title' => $this->t('Legal links'), '#description' => $this->t('Links to legal documents in the enrollment form. Leave empty a row to remove it.'), '#cardinality' => MultiValue::CARDINALITY_UNLIMITED, '#default_value' => $links, 'link_title' => [ '#type' => 'textfield', '#title' => $this->t('Title'), '#description' => $this->t('To include a link, please provide a title as well.'), ], 'link' => [ '#type' => 'textfield', '#title' => $this->t('Link'), '#maxlength' => 2048, '#element_validate' => [[static::class, 'validateUriElement']], '#link_type' => LinkItemInterface::LINK_GENERIC, '#description' => $this->t( 'You can enter an internal path such as %add-node or an external URL such as %url. Enter %front to link to the front page. Enter %nolink to display link text only. Enter %button to display keyboard-accessible link text only.', [ '%front' => '<front>', '%add-node' => '/node/add', '%url' => 'http://example.com', '%nolink' => '<nolink>', '%button' => '<button>', ] ), ], ];
And to save, in submitForm():
$this->config('mymodule.settings') ->set('legal_links', $form_state->getValue('legal_links')) ->save();
- Status changed to Needs work
about 1 year ago 12:30pm 14 November 2023 - 🇮🇹Italy sardara
Test coverage has to be added.
Off the top of my head, I think I didn't add support for nested elements because of the possibility of having #tree set to true or false, making it hard to handle complex cases. Please test that scenario when adding tests. - Status changed to Needs review
12 months ago 6:36am 5 December 2023 - last update
12 months ago 12 pass - last update
12 months ago 12 pass - Status changed to Needs work
7 months ago 9:40am 24 April 2024 - 🇦🇺Australia darvanen Sydney, Australia
Setting to NW as maintainer has asked for tests.