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

Validate a textearea with RegEx in webform (D8)


I'd like to set a form to get people's comments about some articles.

The form contains a simple textarea.

I need to validate the content with regEx before saving it.

the validation would consist in not accepting contents with words like :baby, hot, s.., tinyurl. , urls, ...

For testing purposes, I used to make my regex.

Here is the example expression I tested. I guess it works fine because I get all word structures I'm looking for:

How can I change the aria-checked in buttons using the WebForm module by mouse click?

Hi there!

I am using the button element on webform module:

'#type': 'options_custom:buttons'

but I noticed thah I can just select the button (when I am filling the form) if I press enter.

I want to select the button when I click by mouse, I think that means I need to affect the aria-checked to change the value when I press click, but I am not sure.

Could you help me?

Paragraphs module: Content change is applied to all languages


I use Paragraphs module, Workflows core module and my site is multilingual (German, English, Spanish, French).

For example, if I add a paragraph in the current published German revision (with German text), then this paragraph appears (untranslated) on all other active published revisions, i.e. English, Spanish and French. 

Need help related to hrflang tag in drupal 8?

How to implement "hrflang" tag code on the website running with different languages. If there is any module in Drupal 8 that can help to resolve this. Or we can directly add the "hreflang" tag code.

We have tried to implement the code directly but the code starts to run dynamic and static both.

callback is not invoked

On the online site suddenly the callBacks are no longer invoked. I made a copy of the site on XAMPP (local) and everything works normally.
To understand what could have happened, I created a new content type with a numeric field and activated the callBack which only displays a string via the alert function, but it doesn't work.
It is as if the callback functions are invoked but not executed throughout the site. But in the local everything works normally. This all happened after I upgraded the core from version 8.9.17 to version 8.9.18

How to update paragraph fields programatically (drupal7)

I need to update the alues of the paragraph fields programatically.

Tha paragraph has been created before and it is hosted in a node and I want to update the values in the paragraph fields   programmatically when an event is launched.

I don't need to create the paragraph, the paragraph already exists.

I can identify the node through the ID, and how I can identify the paragraph? is there also an ID, and then how can I get the paragraph ID's for an specific node?

Any ideas where to start,



Subscribe with RSS Subscribe to RSS - Module Development and Code Questions