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

Change custom field from one module to another

Hello,
I have a situation where I have a custom field (myfield) that was initially defined in Module 1. Some fields have been created with it. That field is now defined in Module 2 instead (i.e. Module 1 no longer defines or does anything with that field).

The problem I'm having is that, despite everything about the field being exactly the same, I can't uninstall Module 1 because it thinks there are fields that require it. If I create a new field of type myfield, it correctly assumes it is part of Module 2.

XML-RPC

Hi Guys, 
I'm using xmlrpc_encode_request() this method in Drupal 7 and now I migrated my site to Drupal 9 and I want to use this method. How to use the same ? 
I'm using like this: 

Get defaultValue For a Media Library Entity in Drupal 10

I'm upgrading my theme and I use a combination of Paragraphs module and an Image Field. Previously, I had a function to get the default image. $field_name is the `field_image`:

  $field_definition = $variables['paragraph']->getFieldDefinition($field_name);
$uuid = $field_definition->getSetting('default_image')['uuid'];
$files = \Drupal::entityTypeManager()->getStorage('file')->loadByProperties(['uuid' => $uuid]);
if (count($files)) {
$file = reset($files);
return $file;
}

How to add placeholder text via twig template

Hello,

I like to add a placeholder "Enter your name" to the "Your Name" text field of the feedback form using a twig template. 

Below worked for the email field. 

File Name: input--email.html.twig
Directory: themes/mytheme/templates/form

Address module

I've been working with address module (Version: 8.x-1.12) and I've been able to figure out how to override subdivisions based off of the example (https://docs.drupalcommerce.org/commerce2/developer-guide/customers/addr...) of adding the UK counties using GreatBritainEventSubscriberas a guide.

create content on registration (html files)

Hello everybody!

I need some inspiration/advice on which way to go further.

Site: a free site for shrinks. In return I want members to paste an iframe on their personal site (SEO-shizzles, you know)

Target : (authenticated) member has a personal iframe available (content includes their name and the link links to their personal page (view) on my site)

EDIT: Sorry if this is a simple question, I've been out of Drupal since D7 !!

Pages

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