This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Form ID of Views Exposed Filters

Why is the form id of an exposed views filter always "views_exposed_form"? I have several exposed filters among my views. How am I going to tell the difference between them in hook_form_alter?

Form API drupal vs custom js validation

My question is more to get a better understanding about this Drupal form, not as much the specifics here. I cleaned it up a bit. I'm trying to figure out what is allowing this form to use the Drupal validation and can I replace it with custom ajax to validate field by field, so it displays the error text below each field rather than how it is now in one error block. Is it necessary to disable the built in validation or just override? So instead of "setMessage" can this be done with callbacks on each field?

<?php

namespace Drupal\make_form\Form;

Update list field in callBack

I have a "Movements" content type with various fields, two of these are entity references the first "field_richiedente" connected to the "Applicants" content type and the second "field_activity" connected to the Activity content type
The "Applicants" content type has a multivalued entity reference field, linked to the "Activities" content type, where you can enter the various activities that the applicant can carry out

Automatic filter in views

In a views I have a filter with a title field in which I display the date of the day. If I click on the filter button it filters me by date.
I didn't understand how to automatically filter as soon as the views are displayed

case 'views-exposed-form-gestione-sedute-page-1' ;
    $form['title']['#attributes']['placeholder'] = 'gg/mm/aaaa' ;
    $form['title']['#attributes']['value'] = date('d/m/Y') ;

Proper Method to Redirect

I'm having trouble doing a redirect to a named route. Here is my routing.yml and controller code:

Export form content type from drupal 7 to drupal 8

Hi team

I'm migrating our content types from drupal 7 to drupal 8,
I've been creating our content types and their fields manually in drupal 8, but i would like to know if there is an option or a module to export them, I just want to export the fields for those content types not the nodes.

Could you please help me?

Regards

Mario

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions