Hide new topic link based on the forum topics

Hide new topic link based on the forum topics

My goal is to create a second forum. I created a new content type called forum2 and added taxonomy_forums term reference to it. Drupal automatically creates links for each content type. I would like to display links based on the forum topics. For example ,... read more
How do I show product attribute fields in a view?

How do I show product attribute fields in a view?

I’m having difficulty with what seems straight forward and have tried many Drupal Commerce extra modules. Can anyone advise on showing product attributes in a add-to-cart form? I have product types: – “product” and – “boat... read more
How do I show product attribute fields in a view?

How can I add an external (CDN) CSS style sheet to a theme?

I’m trying to add Font Awesome to a Bootstrap subtheme I have made. Here is the code I am using in subtheme.libraries.yml, which is based on the documentation for hosting external JS libraries in Drupal 8: font-awesome: remote:... read more
How do I show product attribute fields in a view?

How to add UniqueField constraint on integer field?

The title basically says it all. I have the following field definition in an Entity class: $fields[‘code’] = BaseFieldDefinition::create(‘integer’) ->setLabel(t(‘unique code’)) ->setDescription(t(‘Some unique... read more
How do I show product attribute fields in a view?

How to properly compare values of two identical entities?

I have a custom entity that is not revisionable and I need to store any differences made by the user – and only differences, so if nothing has changed there should be no entry. I am doing this in preSave method because the original entity has the same format as... read more
How do I show product attribute fields in a view?

How to add an existing variation to a product

How to add an existing variation to a product? When I create a product the form forces me to create a new variation, but I also want to add an existing one to the same product. read more
How do I show product attribute fields in a view?

Integer user form field with min 11 digits and max 11 digits

I need an integer form field with has a validation of min 11 digits and max 11 digits. In other words; the user has to fill in an 11 digit code. How do i make this field and validation? Update: I managed the field by setting a min of 10000000000 and max of... read more
How do I show product attribute fields in a view?

How to implement Likert Scale with EntityForm?

I was using Webform, but I need to provide an autocomplete field to reference a node of a particular type. I see many recommendations to dump Webform and use EntityForm, but the first question type I need to reproduce is a Likert scale. I don’t see any... read more
How do I show product attribute fields in a view?

How to create paragraphs item programmatically?

How to create paragraphs item programmatically? In Drupal 7 I am using the following code. $node = node_load($nid); $paragraph = new ParagraphsItemEntity(array(‘field_name’ => ‘field_name’, ‘bundle’ =>... read more
How do I show product attribute fields in a view?

Override module javascript file in theme or custom module

Is it possible to override a single javascript file from a module within a theme or custom module? My specific use would be for Views/js/ajax_view.js – I’ve had to apply multiple patches to get ajax views to work properly with BEF and panels, and though... read more
How do I show product attribute fields in a view?

How I can include Commerce SKUs in search result?

How I can include Commerce SKUs in search result? I am using “Search API and Search API Solr” modules. Any suggestions? read more
How do I show product attribute fields in a view?

Conditional Fields with multiple conditions

I am using Conditional Fields module. I need some guidance when setting dependencies for multiple fields (accepting unlimited values). Here is the situation: In my entity form I have two fields: Assignment Status –> This is Select List type with two values... read more
How do I show product attribute fields in a view?

I have issue with commerce_order_load_multiple function

The way i am using this function is foreach ($mms as $mm) { $orders_of_user += commerce_order_load_multiple(array(), array(‘uid’ => $mm->uid, ‘status’ => ‘cart’)); } But i am not getting anything output from this and when i... read more
How do I show product attribute fields in a view?

Webform: POST data and send user to external URL

I was reading this interesting post: Webform – Submit values from Drupal 7 from to external url I’d like to know: instead of just sending the data via POST and keeping the user on the Drupal site, how would you send the user to the URL the form values are... read more
How do I show product attribute fields in a view?

Render form with ajax submit

I have a custom form in a module, similar to this example: function mymodule_form($form, &$form_state) { $radio_options = array(…); $form = array(); $form[“wrapper”] = array(“#markup” => “<div... read more
How do I show product attribute fields in a view?

Multiple independent Views attachment pagers (load more)

I have a view with two attachments. I want to have a load more button to load items for each attachment and the main view separately, I have the load more module, but it loads more items for all the views, not for each attachment separately. Any help will be... read more
How do I show product attribute fields in a view?

AJAX Populated Views Exposed Filter

I’m re-building a travel website and need the trip search form to have the “Arrivals” select populated using AJAX once the departures has been selected to remove any empty search results. I have followed all the tutorials I could find online, namely:... read more
How do I show product attribute fields in a view?

Send email to all users of a role except certain users?

I’d like to send an email to a users of a certain role. I’ve already did it with Rules module, but now I want to expand my rule and send email to only certain role’s but to a specific users of that role. Example: Send email to a role admin, except... read more
How to wrap / manipulate element outputs on a form’s checkboxes html?

How to wrap / manipulate element outputs on a form’s checkboxes html?

I have the following form that contains a big list of checkboxes. The first checkbox is the parent of the children below it. In my case it is called “Africa” and the ones below it are “Africa-child” checkboxes. I was able to manipulate the... read more
How do I show product attribute fields in a view?

Create custom endpoints by extending the Resource Base class

I created a custom endpoints by extending the core of Drupal. but I can not retrieve JSON data. I do not know what value to put in ‘note: serialization_class /** * Provides a resource to get bundles by entity. * * @RestResource( * id =... read more