How to access webform elements in webform.html.twig

How to access webform elements in webform.html.twig

I’m trying to figure out a way to access webform elements from webform.html.twig. I need to style the form; wrapping some elements and adding bunch of styles all I have in the webform.html.twig is “children” variable which renders the whole form,... read more
How to access webform elements in webform.html.twig

ANDs within OrConditionGroups

I’m trying to use entityQuery in Drupal 8 to perform an "and" within an "or" group. A simplified version of what I’m trying to do is this: Query for all apples, oranges and bananas that are ripe. The code I’d like to be able to... read more
How to access webform elements in webform.html.twig

Views Pager Add rel="nofollow to ALL Pager Links

In Drupal 7 I am trying to add rel=”nofollow” to ALL of the pager links in views. The closest I have got is to add the nofollow to next links, but I want it to include previous pages as well as “First” and “Last”. P.S. We... read more
How to access webform elements in webform.html.twig

Get Url Alias in Algolia

I have implemented an Algolia search in my drupal instance and would like to use the node url alias (/some-example-path) rather than node id (/node/{nodeId}). Is there a quick and easy way to do this using the Search API? read more
How to access webform elements in webform.html.twig

How to add twig code in View ‘global custom text’ field?

I want to show a link when a node is published. I added the Content: Publishing status field and hid it. In global custom text, I added the following code. {% if status == 0 %} <div class="apply_job"><a href="/appy-job"... read more
How to access webform elements in webform.html.twig

How to make Adaptivetheme dropdown menu show on start page?

I’m using Drupal 8 with an Adaptivetheme subtheme. The horizontal navigation menu resides in the leader board region. Some menu entries have submenus, but they do not show on the start page. One has to click on the respective menu (e.g. “Football”),... read more
How to access webform elements in webform.html.twig

Getting current node id in views

I’m on drupal 8, and I’m trying to figure out how to get the current node id in an override of views-view-unformatted.html.twig. I have a view filled with titles with added links and I want to add a class to the one the corresponds to the current node... read more
How to access webform elements in webform.html.twig

How is AJAX attached to exposed filters?

I am currently rendering a view manually like so: $content = Drupal::service(‘renderer’)->renderPlain(views_embed_view(‘user_admin_people’, ‘page_1’)); Then I’m sending the html to the page and inserting it into a div with... read more
How to access webform elements in webform.html.twig

Can I migrate importing Features 6 code?

I am attempting to migrate Drupal 6 to Drupal 7 using the migrate_d2d_ui module, but the cck fields are not coming over correctly. Can I use the Drupal 6 Features module to generate code which can be imported by the Drupal 7 Features module? read more
How to access webform elements in webform.html.twig

Load all/multiple fields from entity of certain type

I’m quite new to Drupal so bear with me here. I’ve created an entity using Drupal Console, specifically using drupal generate:entity:content. Which works perfectly. Kudos to the Drupal console guys. This specific entity will deal with adding some meta tags... read more
How to access webform elements in webform.html.twig

How to to render a webform (or any configurable form) in a node edit form?

I have a weird use case, where I was looking to perform the following: In a node edit form, allow a user to entity reference a collection of webforms When a user selects an appropriate webform from the entity reference autocomplete, render that form in the current... read more
How to access webform elements in webform.html.twig

‘invalid render array key’ error when using an associated array for a twig variable

I have a list of images, and I want access to both the direct path to the image, and the path with an image style applied to it available to a twig template. I’m grabbing the images in my .theme file like so. $images = $node->get(‘field_image’);... read more
How to access webform elements in webform.html.twig

Migration sources files problem

I am trying to migrate a drupal 6 to 8 through drupal migrate ui and i am getting a error with the sources files, drupal 8 is not able to read sites folders due is writting a double slash. Does anyone why this happens? Source ID 3125: Cannot read from non-readable... read more
How to access webform elements in webform.html.twig

Get the list of available services

Is there a way to get the list of the available services in Drupal 8? read more
How to access webform elements in webform.html.twig

Warning: Missing argument 2 for l() [closed]

I try to show image that have link but i received error like this is anyone know and can help me .. thanks Here’s my code <div id=”profil”> ‘.tabel_budgetcenter().’ </div> <div id=”pengeluaran_pp”>... read more
Taxonomy Term Hierarchy(not programmatically nor content related)

Taxonomy Term Hierarchy(not programmatically nor content related)

I know there are zillion topics about this, but I just couldn’t apply it to my View Block in Drupal 8. On the other hand all these Taxonomy Term Tree creation is based on content related. Here is what I would like to do, I would like to display my... read more
How to access webform elements in webform.html.twig

Enable rest resource resource when module installs

I have a custom rest resource I have created within my module: /** * Provides a Demo Resource * * @RestResource( * id = “custom”, * label = @Translation(“custom”), * uri_paths = { * “canonical” = “/rest/custom” * } * )... read more
How to access webform elements in webform.html.twig

How to configure chosen on Form API with an entity_automcomplete widget?

How to configure chosen field on Form API with drupal 8. I have already installed chosen and it’s works in User Interface and not in form API. This peace of code doesn’t work: $form[‘tags’] = array( ‘#type’ =>... read more
How to access webform elements in webform.html.twig

Getting a translated country name from an address field

I have an address field from which I’m getting a country code and then, using the address.country_repository service, checking the country’s name. $full_country_list = Drupal::service(‘address.country_repository’)->getList(); $country_code =... read more
How to access webform elements in webform.html.twig

How to validate a value against an existing field

I’m doing some custom stuff with programmatically saving fields with EMW: $wrapper->my_field->set(‘my_value’); Problem is, this doesn’t validate before trying to save the field. How can I validate the value against the field before trying... read more