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

Address field. Accessing Country value

Hi
I'm using the address field in Drupal 9 for Country only.
In a module I process the form values after submit and send them off to a CRM.
I decode the values first with $arr = json_decode($values, true);

Simple fields are fine and I get the values OK using $arr['email'] for example.

How can I access the selected country value?
All Ive got so far is "Array"

Thanks

How to output value of a property in a stdClass object?

I have a field that is structured like this:

field => stdClass Object
(
    [__CLASS__] => stdClass
    [uid] => 1
    [type] => article
)

I try to inspect like this:

dpm($field->type, 'field->type');

And get the following output: " field->type => article", which is reasonable.

However, I also get the following notice:

Notice: Trying to get property 'type' of non-object in …

Adding combined fields to new content type

Hi there,

I'm trying to set up a site using Drupal for the very first time, but I don't know what's the best way to accomplish the following:

Change "label" variable

The twig template (named node--research.html.twig) has the following code

<h1 class="h1 content-section__title">{{ label }}</h1>

Stop Google Fonts Drupal 7 Porto Theme

Hello, everyone,

I haven't used Drupal for a long time, but I still have an old Drupal 7 installation with the Porto theme.
I would like to deactivate the loading of Google Fonts there, but I don't know where else to look. Where could the Google API be hidden?

In the template.php I deleted the following lines

Pages

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