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

Apply codding standards in twig templates programmatically

Hi, I'm creating a series of scripts to programmatically apply durpal coding standards, for "normal" files I've used phpcbf --standard=Drupal and for JS files I've used eslint, which is integrated in drupal's core. Is there any tool to fix the coding errors of twig's templates?

Modal dialog form not reacting to AJAX submit handler

I am creating a custom field widget where a user can click a button and edit some fields in a form inside a dialog modal.

Opening the modal works fine, but I cannot seem to make any buttons inside the modal form react to anything I throw at it.

In the below example, when clicking the "submit" inside the modal form, the "submitAjax" function is not executed, and I receive a standard AjaxResponse in my network debugger. I've tried using different class names "use-ajax" and "use-ajax-submit", I also tied without any.

entity_autocomplete allows multiple value

I have an "entity_reference" field which displays an "entity_autocomplete" form field.

I would like the user to select only one value.

The problem is that the field allows the user to enter multiple values (separated by commas), even though I set the field cardinality to 1 and "Tags" is false by default.

Code:

Connecting to SQL Server View

I need to connect to another database and am planning to use Views Database Connector module to display content from that second database. The second database is a SQL Server View. I configured settings.php to connect to that database but it's not seeing the tables. For testing to make sure my code was working, I connected to another mysql database in a separate server and it worked fine and was able to see the tables from that database through Views Database Connector.

Because this is a View in SQL, do i need additional settings in my configuration? 

using AJAX to load hidden content in background

I'm trying to become more comfortable with AJAX outside of forms and have checked some helpful pages to get me to this point. In D7, I built a custom module that loaded up two HTML tables, one with a few hundred rows and a second with a few thousand rows. The latter was wrapped in a div that was hidden. That meant the user had to wait for both tables to finish before the page loads. 

videos on product listings

Hi

is there a way to add videos of a product i sell, sort of what amazon allows on their product listings?

i use drupal commerce on drupal 7

thank you

ben

Pages

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