Timer on a form

Hi, I need to make a timer in a webform form, to know the total time it takes to fill it out. I thought that the best way to implement it could be by javascript. I have not seen any contrib module.

thanks!

How to use GET request in twig file?

Hi,

I want to retrieve a parameter using GET request in a twig file. My url looks like the following:

text/10405/page?source=field_gita_10589_text&audio=1,

If audio parameter is set, I want to add a button named "Play Audio" next to the content displayed, how can I do this in my twig file?

Currently my twig file looks like this, it displays some content:

access taxonomy term fields from nodes using computed field

Hello,

I have a little problem with calculating age.

I have a taxonomy term "Animal". It has a "name" and "date of birth" field.

I have a content type "Test Results". It has a "date of test" and "animal" fields. The "animal" field is a reference to taxonomy term "Animal. 

I would like to have another field that calculates animal's age at the time of test.

So "date of test" - "date of birth" = "age at time of test".

I've installed computed field, but I don't know how to do the above mentioned calculation.

Can you help me?

Best,

New to Drupal but not to Symfony or Twig

I've got a completely built site under Symfony 4.3 with a working theme split into multiple twig templates (ex., header/body/footer/etc).  How difficult would it be to refactor those twig templates into Druapl?

Validate image file resolution

Hello

 Im building a custom module it has some form, i need to validate the image being uploaded to be only 300x300 pixels, im using this way to validate the form:

'#upload_validators' => [
'file_validate_extensions' => ['gif png jpg jpeg'],
'file_validate_size' => [25600000],
],

I have found Drupal 8 has this function to call: file_validate_image_resolution

Site Unexpeced Error: Unable to determine class for field type

On drupal 8 site, I installed a contributed module and then added a field to a content type to test the module. After finding the module wasn't working as expected I decided to uninstall the module. To do that I tried to delete the field I had created, on clicking delete the site has remained inaccessible and displaying only this error:

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x