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

Send values from js to php

Hi everyone

In my module i have a js code with some variebles.

 

I want to send the values of variebles in php code (FirstController.php)

I know that js is in client side and php in server but i want a simple way to get values from js to php

js code

var response = something.innertext;

php code

public function example() {

$example = """the value of respone"""

echo $example;

.........

Ajax response not fully rendered

Hello,

I try to handle a list of items on a node advanced form using ajax. Each list item has a textfield and a remove button. There is an add button under the list to add items. Add button and delete buttons use ajax. Items added on page load are ok, but the ones added through ajax are not complete. Textfields do not have default value or description. Moreover, the delete buttons do not seem to work. My code:

drush generate broken - ArgumentCountError: Too few arguments to function Twig\Extension\StagingExtension::addFilter(),

Hi there! I gave anything but that's apart my level. Since a month or so, bolderplate generation with drush is broken. I've tried to fix it on my own, with no luck. Now i really need to generate some things.


Anything with drush works fine but "drush generate ... " results in:

[solved] Updating D8 when command line uses PHP 5

I have a Drupal 8 site that uses PHP 7. However, the command line uses PHP 5 - therefore running composer install fails. The phpinfo on the actual site confirms it's using PHP 7, but the command line is using PHP 5 - I don't manage the server so hard to change.

Is there any way of updating the site?

Update

Have been told I can get the command line to use PHP 7 now. Probably not a good idea using a workaround anyway considering Drush uses the command line PHP version.

User-facing WYSIWYG page builder?

Hey folks,

New user here, so above all else, I'm sorry if I'm posting this in the wrong area. I read through forum rules and the like, but I'm new to Drupal and don't know if this is the right forum section for this or if post installation is better.

Page views using taxonomy lists help

So I have a content type of "blog articles" and want to drive it using taxonomy lists as the filters/menus. In a page view I can set up a filter for blog type and set the path like /blogs/% where the type is either /blogs/blog1 or /blogs/blog2 and that filters the articles easily.

My question is can I expand on that and set up a path like "/blogs/%/category/%" also using taxonomy lists for type and the category which would make the url /blogs/nameofblog/category/categoryname

Pages

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