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

DownLoad

I created a module and through the controller I download the nodes I need.
In the controller I also entered the code to display the movements on the web page.
The problem is that once the file is downLoaded, it does not show me the web page, which it does if I do not execute the downLoad code.
Is it possible to make the 2 things coexist?

Role base access to uploaded media in drupal 8

I have a custom form with managed_file field for video upload in my custom drupal 8 module. Once video uploaded, it is accessible to everyone. I want to restrict video access to logged in users or specific user roles. I tried "Private Files Download Permission" module but it always says forbidden for everyone. I have setup private file system path and files are being uploaded on private directory but not accessible over browser. My custom form field code is:

Commerce 2 and Drupal 8 sent email

good morning I'm using Comerce 2 and Drupal 8

I already have it working and when doing some tests I realized that it only sent the email with the invoice and the order confirmation to the email of the customer who made the purchase.

I would like to know if you can also send an email with the purchase confirmation to the business email.

awaiting your attention.

Setting a field value from a form_alter hook

I'm trying to set a hidden field value from a form_alter hook but all these options fail.

$form['campaign'] = 'test';
$form['campaign'][LANGUAGE_NONE][0]['value']['#value'] = 'test';
$form['campaign']['widget'][0]['value']['#value'] = 'test';
$form['campaign']['value']['#value'] = 'test';

This, however, works so the Hook is OK.
$form['#action'] = 'test';

I don't know what else to try and can't find anything on this forum different from the above.

Please help!

Sum in views

In a views, I have only one content type, with a field_import. In _views_pre_render I have entered this code to calculate the sum
              foreach ($ view-> result as & $ row) {
                $ Total + = $ row -> _ entity-> get ('field_import') -> value;
              }

Probleme with multiple values using entity reference

Hello

I created a module for Drupal 7 in which I import my data through a CSV file, in a column 10 I put ids as reference values for a reference entity field as in the image below , what I need is when I upload my file I want the values to be filled automatically in the reference entity field named "field_theme"

Thanks for your help

https://postimg.cc/QFLn5Cg7

Pages

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