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

Drupal 7 - Click button and then set form field value and redisplay form

This is not working for some reason. The form is redisplayed but the textarea field remains empty. Why?

How do I fix this error about the Node class not found?

I've installed Drupal 8, I've created a PHP file to read a XML file and insert some items, but I'm getting this error.

Fatal error: Uncaught Error: Class 'Drupal\node\Entity\Node' not found in C:\xampp\htdocs\drupal8\migracion.php:12 Stack trace: #0 {main} thrown in C:\xampp\htdocs\drupal8\migracion.php on line 12

This is the code I am using.

Delete nodes if date(custom field) is pasted

Hi everyone, 

I have a content type "sale" with a field "date", and I would like to delete node automaticaly when date is more thant 7days after now.

Rules en Drupal 8, is a nightmare for me ! I tryed to make a custom module but it's not a success...

Do you have a solution for me ?

Thank you so much for your help !

Want to create a custom text block that is based on twig.

Just like how the views uses little twig based input field, I want to do the same for my mail message body.

I've copied the form code over from the core->view module, but I am not sure how to set a set of fields to be available to use.

I also tried to use the {{ druapl_field('field_name','node' node_id) }} but this doesn't seem to be working.

Is there a way to set which fields will be available as a replacement pattern or make the function above to work?

Empty shopping cart button

Good morning:
I am using Drupal Commerce and everything is perfect but I would like to add a button to empty the shopping cart if you have any way to do it, I would appreciate it

Custom Section on top of one page

I am using Drupal 7 and I want to add a new page with a custom section on top. This custom section consists of some information that we are getting through some rest API. 

I want this custom section on top and client can add html content and sections below that section from the Drupal backend.

I tried creating a custom page--custompage.tpl.php and added that section. That page worked fine but unfortunately, it wasn't editable from the Drupal dashboard and we could not add sections before it so it was of no use.

Pages

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