Can we call submit handler of one form into another form?

Can we call submit handler of one form into another form?

Can we call submit handler of one form into another form? I have two forms say user profile form and choose membership plan I want to unset submit function of choose membership plan and want to show in user profile form and also both forms field must save. like... read more
Drupal::request()->request->all() returns an empty array

Drupal::request()->request->all() returns an empty array

I have a custom controller that expects POST data. I had it working fine in 8.1.0 retrieving the data using Drupal::request()->request->all() and Drupal::request()->request->get($myvar). Now, without any changes in my custom module,... read more
Can we call submit handler of one form into another form?

How to get all parent nodes from a menu item?

Imagine the following menu structure: Page 1 type: article Page 2 comes from a view Page 3 type: desirable < want this Page 4 type: random Page 5 type: random Page 6 type: article Lets say I’m on Page 5. I want to know if any parent menu item’s node has... read more
Can we call submit handler of one form into another form?

How to check if the AMP module (Accelerated Mobile Pages) is working?

I’m testing the drupal AMP module (Accelerated Mobile Pages), well, I’ve installed it, pre-configured it (I’ve not created the subtheme..)but I’ve enabled it for one node (just for a test). How can I test it ? Doing a google search on my... read more
Can we call submit handler of one form into another form?

How do I sort a view by content type?

I use a View to show search results (core Search module). In the view I have grouped the grid on the field “Content type”. This works fine, each content type is shown under it’s own title. But under “Sort” in the View I can only sort the... read more
Hide progress bar

Hide progress bar

I am using commerce checkout progress module for showing the checkout progress to the user. I am showing this block in cart page also. I want to hide this block if the cart is empty. How can I achieve it? read more
Can we call submit handler of one form into another form?

How to translate the language switcher links

In Drupal 8.1 the language switcher (block can be placed in a region) shows the languages labels in English: English | German | French I want to translate it. Visiting mysite/de the label should be in German: Englisch | Deutsch | Französisch mysite/fr –>... read more
Can we call submit handler of one form into another form?

Custom template for each profile2 profile type edit form

I am working on a Drupal 7 site and for a few days now, I’ve been struggling with this problem: I am trying to create a custom template for the edit profile form, but there are more profile types. I managed to create the template but it does not work properly. I... read more
Can we call submit handler of one form into another form?

How do I override the subscription block?

I am developing a Drupal 8 website and I want to override the subscription block used by the Simplenews module. I know how to achieve that at Drupal 7, but the module is different now. For Drupal 7, I followed... read more
Can we call submit handler of one form into another form?

Redirect taxonomy term page links to a View page’s exposed filter

I’m trying to make every taxonomy term page link direct to a pattern like this: /viewpage?[term:vocabulary][]=[[term:tid]] So, for example instead of material/bronze where bronze has term id 7, you’d have: /viewpage?material[]=7 …and you’d go... read more
Can we call submit handler of one form into another form?

Ajax form an multi-select

I have a form which provides select2 when the select1 is changed. However I would like select2 to be a multi-select. I can’t seem to get this to work. It populates a single select input just fine, but not the multi-select. Any tips would be appreciated. public... read more
Can we call submit handler of one form into another form?

Get the route name of the current page

The route name of the current page is available in page.html.twig? The page is generated by the default feedback form. read more
Can we call submit handler of one form into another form?

Creating multiple URL aliases for the same node with their own context

I want to solve the following problem with Drupal 7 solely using existing modules and without any extra code. I have a contenttype called ‘News’ I create a news item and assign a taxonomy term called ‘Sport’ and a taxonomy term called... read more
Can we call submit handler of one form into another form?

How to get the base URL of a site

My site is on http://drupal8.local/. How do I get the drupal8.local part of that URL? Url::fromRoute(‘<‘current’>’) or base_path() returns the path parth of the URL; For example, for http://drupal8.local/a/b/c/d/e/f, they return... read more