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

background color in the field

Hi, in a form I have several fields.

Some of these fields I would like them to have a background color.

I tried this code in form_alter but to no avail

function udf_form_alter( array &$form, FormStateInterface $form_state, $form_id ) {
   if ( $form_id == 'node_management_private_account_form' || $form_id == 'node_management_private_account_edit_form' ) {
     $form['field_fuel_total']['#attributes']['class'][] = 'background-orange-naut' ;
   }
}

Save searches made by user in a view

Hi,

I want to save searches made by user in a view by the hook_views_query_alter ..... after the user put tha data in the form serach in the view, i saved it in other table ( create custopm node historySerach)

it is a track I follow it or there is a drupal module ?

thanks a lot

Custom module with settings table like url alias

Hey,

I want to create custom modules with settings admin:

1- simple form ( ready did, it is simple)

2- With table and un btn for add line in this table ( like module core URL Alias): I don't find any tuto with this case.

If you have idea how can'i build this table in config settings ?!

Thanks 

Best regard

An installation error broke the site. Help me to understand.

Hi everyone!

On a working site, I installed the social_auth_vk module.

I absolutely don't know what to do. Please help me to do this.
The error is like this:

Drupal\Component\Plugin\Exception\PluginException: Plugin (text_format) instance class "Drupal\filter\Element\TextFormat-1" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).

Drupal 10: Twig template for forms

Hello all,

I have developed a custom module that implements FormBase. I am displaying the form data as an HTML table with a remove button. Everything works well however there is a piece of code in the Twig template that feels hacky and I am looking for the proper implementation of it.

I declare an array of plain_text elements containing the record information like this:

Finding the editable paragraph referenced

I’m creating a backend search where the results point at not only the page/node the term may be found on, but also the location where the text can be edited by the admins.

Pages

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