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

Parent Node Needs to Display the Webform Scheduled Date that is Referenced in the Child Node

I'm not sure how best to approach this problem and I'm hoping someone can point me in the right direction.

Quick summary of the setup of some nodes: Node A is the parent node. Node B is a child of Node A. Node B also houses/displays webforms. We have a "form" field in Node B where we can call existing webforms and Node B will then display the webform and any additional information (entered in Node B) to the user.

Drush CMI tools package not found

Hello.

I met an issue with drush cim when importing a webform (not modified moreover). It asked me to delete all webform submissions before import, what I cannot do of course.

So I googled for a way to prevent exports of some yml with cex. I found the command drush cexy on drushcommands.com and tried to add the library with :  composer require "drupal/drush_cmi_tools:~2.0"

But I received "Could not find package drupal/drush_cmi_tools."

Why ? Does this package exists ? There is no git repo neither.

Did somebody succeeded to use drush cexy and cimy ? 

How can i pass parameters to my js from module?

Hi,

I can not figure out the way to pass parameters to js, pls help! Below is my code:

my module_name.module:

function paiqian_page_attachments(array &$page) {

 $currentRoute = \Drupal::routeMatch()->getRouteName();

  if (  $currentRoute == 'PaiQian.ZanLiuInput' )

     {

         $service = \Drupal::service('paiqian.getWxUsage');

         $re = $service->getSignPackage();

         $page['#attached']['drupalSettings']['paiqian']['appid'] = $re['appId'];

Custom views filter and joins

I'm trying to build a basic views filter that I can expose that lets me search through a paragraph entity for a specific value on a field. I am extending the base 'StringFilter' available via views and altering the query() method. Below is what I have:
 

Form API: create a "text_with_summary"?

Hi,

for a module, with HOOK_form_alter, I manage to create various text fields on Drupal 9.

But I failed to create a "text with summary" field. Basic text is #type=textfield, long is textarea, formated texts are #type=text_format + #base_type=textfield or textarea.

But I can't figure how to create the "text with summary". I tried "textarea_with_summary", "text_with_summary", both for #type ou #base_type without success.

Any clue? Regards.

Note: by using text_format+text_with_summary I just get the formating option, not the textarea.

How do I call a JavaScript function when a page is loaded?

Hello,

I am doing a custom module development in Drupal 9. So here my goal is to fetch all records from my Database and show it o the web page. For doing this I am using javaScript . So here my problem is if I am calling a javaScript function within a <script></script> tag , the function is not at all getting called. But when I am doing on click event the function is getting called. So here I am providing my code base along with my folder structure. Please Help e ASAP.

Folder Structure, that I have is :-

Pages

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