In a custom form I have 3 buttons. and each calls a function.
In the validate of the form, I have inserted the control on a field before the processing takes place but it is only needed when I click on the first button.
When I click on the 2nd or 3rd button it does the same check but does not have to check.
I thought in validate to insert the check on which button was clicked and only for the first to check.
With kint I visualized the array
ksm ($form['submit']['#submit']);
The website encountered an unexpected error. Please try again later.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "post_type" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 143 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
Hi, I have written a custom form and I would like to insert a double button to submit.
The first they call it submit1 and the second submit2
The first has to call me the function
public function submitForm(array &$form, FormStateInterface $form_state) {
and the second
public function submit1Form(array &$form, FormStateInterface $form_state) {
I am quite new to Drupal and was looking for some help with Paragraphs and Twig templates.
I've got a Paragraph link field I am trying to add some styling to by altering the Twig template. The Paragraph name is ms_useful_resources and the field name is field_ms_links_multi.
I've created a twig template called paragraph--ms-useful-resources.html.twig which has this code: