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

Webform field custom validation, how can I do it?

Hey,

I want to do a custom validation for a field in some of my webforms.
I came across this code:
https://www.drupal.org/docs/8/modules/webform/webform-cookbook/how-to-add-custom-validation-to-a-webform-element

this is the data from the webform devel
the field I want to do the validate on id calle `idno` 

I don't understand:
1.what are the values:
 

What would I use to get content type please

HI

I am using the following code to change the autocomplete text displayed in the results returned from an entity reference

$entity_type_id returns node, how would I return the content type please (e.g. Classes) I ve read loads but can't find what I am looking for.

Thanks

protected function getLabel($entity_id, $entity_type_id, $label) {

$entity = \Drupal::entityTypeManager()->getStorage($entity_type_id)->load($entity_id);

Configure queue for mailing

Hi,

My hoster told me to send only 300 mail by hours for avoiding spam.

So I decided to create cron job, and the cron will start every hours.

So I need to tell to the cron :

On each run only process 300 items from "email_processor". How Can I do that ?

here is my function to create mail item :

Drupal 8 batch process in form with ajax submit button.

How can I run Drupal 8 batch process in Drupal form triggered by ajax submit button?

Thanks

Adding a custom field to my product price

Hello,

I am using a REST API to import products from an external source. All products have a price. I would like to add a custom field to the product type, which will not be imported from the API, but I fill in manually on every product. I want this to be a price field which adds to the product price.

Example:

- Imported product has a price of 25 euros;
- My custom price field: 5 euros;
- Price on product when displayed to customers and which they have to pay: 30 euros.

How can I add these two fields togheter?

Thanks,
Mike

Extra product page and changing the product URL

Hello,

I am quite new to Drupal and Drupal Commerce. I have a store where I am using an API to import products from an external source. 

So I built a product catalog page by creating a view and displaying all the products on this page. 

With a Link to product button I can go from the catalog page to the product detail page, everything is working fine. But now I would like to have a button on this product detail page to another page with a more detailed story about this product. Now I have three questions:

Pages

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