Webform Add More for grouped elements

Webform Add More for grouped elements

I’m building a Webform in Drupal 8. One section has repetitive grouped elements that could be added more than once. For instance, it’s something like: Where they could add more if they want. If this was a node, I’d use Paragraphs to create a bundle... read more
Show modal modal message on form success

Show modal modal message on form success

I have a custom form that submits via AJAX. On form error, i simply return the whole form on my callback function, and the HTML is replaced, but i want it to open a modal dialog on success. What is the best way to do this? This is what i’m currently doing (i... read more
Show modal modal message on form success

Set the default value for a password field on a custom form

I have created a custom user register form. I want to set the default value for the password, and confirm the password fields. My point is that, whenever form error occurs, the password fields get cleared. Users don’t need to type the password again and... read more
Show modal modal message on form success

Non-empty string as route parameter

I’m creating a search results page using the Search API. I want to set an url like this: /search/{text} How should i set up my route? It must accept any combination of characters, including non-ascii, spaces, numbers, etc, but it must not be empty. This is my... read more
Show modal modal message on form success

What is the equivalent of hook_property_info_alter()?

In Drupal 7, The Entity API module uses hook_entity_property_info() and hook_entity_property_info_alter() which allowed us to add custom properties. (Not everything is a field.) I can’t find anything related to Drupal 8. The only thing I find is how to add it on... read more
Show modal modal message on form success

Submission of dynamically generated input fields

I have created data entry form using Drupal 8 Webform (Yaml forms), Part of the form is table field which hosts dynamically generted textfields using jquery shown below: $(document).ready(function(){ var input=””; var column=””;... read more
Show modal modal message on form success

How can I bulk update the language for all content?

I have a site that has been duplicated from an english site and has been translated into Italian. I installed Italian as a language and have set it as default. However, all of the nodes created in the cloned site are still set to “english”. How can I bulk... read more
Show modal modal message on form success

Change / Set Node Reference field in hook_form_alter

I am trying to set the value for an existing Node Reference drop-down field in a content type via hook_form_alter as part of an AJAX call. The form needs to set values based on a selection, which is does correctly for dozens of fields, but I can’t get or find... read more
Show modal modal message on form success

Alter message status per content type

After hours trying to figure it out, no way ! What am I doing wrong ? function alter_appointment_message_form_node_form_alter(&$form,&$form_state,$form_id) { if($form[‘#node’]->type==”appointment_request”) {... read more
Show modal modal message on form success

Convert Field Collections into Paragraphs during Migration

I have a content type that uses Field Collections in Drupal 7. I am migrating to Drupal 8. Is there a way to convert the Field Collection Entity into Paragraph during migration? read more
Show modal modal message on form success

How To get transaction details in commerce checkout complete page

Can anyone please help to get the transaction details in commerce checkout complete page. I could get using hook_commerce_checkout_complete($order). I can show the success/Error transaction and order details in drupal_set_message. But Exactly I need show in checkout... read more
Show modal modal message on form success

Programmatically update field collection data in custom entity

I am in desperate need of help. I have a custom entity called Question which has a bundle called data. Within the data bundle, I have a collection field called options with two subfields called correct_option & misc_option. -Question -Data -options... read more
Show modal modal message on form success

How can I display multiple images of single image field each in a different row?

I need to render multiple images that belongs to single image field, each on its own views row. While on a view single field setting, inside “Multiple field settings”, uncheck ” “Display all values in the same row”, But all values are... read more
Show modal modal message on form success

How do I get only node IDs from the search results?

I’m using Search API Solr with custom searches in code, but I want to find a way to limit the return results to only the nid to save on bandwidth with our third-party solr server. I’ve tried $query->fields(array(‘nid’)) but I receive the... read more