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

Drupal http request body raw mode

I need to build a http_request raw json in drupal 7

and the format of the json is:

{"customerAddress":
{
"address":"foo st",
"town":"Roma",
"postalCode":"00131",
"district":"RM"

},
"products": [{"nmuId":"SOME-ID"}],
"business_type": "LEAD"}

this is the code in my custom module

$url = API_HOST;
$indirizzo = array (
'address' => $address,
'town' => $city,
'postalCode' => $cap,

Render Drupal block description

How to render Drupal block description field (default field) in block.html.twig.

How to pass a variable from client(.js) file to server(Drupal .php file)?

Hello Friends,

I have been stuck on this for way longer than I care to admit.

What I am trying to accomplish:

I would like to capture the current users location as soon as the open any page on my drupal website (the only way I have found on how to do this uses a Javascript function). Once I have the users location saved as a variable in my .js file, I would like to send the location variable to the server side of my application and set it as a session variable or something so that I have access to it globally.

How to print multi variable in a drupal_set_message ?

Hi guys,

I was actually working on my module and I want to display a confirmation message once someone apply to my form.

I arrived to do it with one variable but I don' t arrive to add another one. I'm super novice in php and drupal that's why it can sounds stupid.

Here is my code

Drupal 7 restrict login by ip - Monitor

We are using a drupal 7, with the module "restrict login by IP".

We restrict by: mail & Ip address.

Our goal is to get "debug log", for Add new row to this table (for monitoring any changes in this rule - for security reason)

Any idea for how to monitor this operation?

Thank you!

Custom block not being import

Hi everyone,

I'm a novice at Dupral but I've to do a project to possibly entry in a firm.

I have to create a custom block and put in it a Form.

For now I just want to create the custom block and import it to see if I can start working on the form.

But here is the problem, after trying to watch videos or read article on it, my block never arrive on my local website.

Here is my code 

Pages

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