How to make select option works like a button?

How to make select option works like a button?

I have created a contact form by using webform module, in that I have added one component as reset and the type is select options. My requirement is when I choose this reset option from that dropdown and submitted the form, I want to reset my form. I have no idea how... read more
How to make select option works like a button?

How do I override the admin theme in my own theme?

I created my own Drupal 8 theme: mytheme.info.yml: name: My Theme description: ‘Drupal 8 Theme’ type: theme base theme: bartik core: ‘8.x’ mytheme.libraries.yml global-styling: version: 1.x css: theme: css/layout.css: {} css/style.css: {}... read more
How to define an image style where images are the exact same dimensions (e.g. grid of square images), without cropping or distorting the image?

How to define an image style where images are the exact same dimensions (e.g. grid of square images), without cropping or distorting the image?

On my site, images of any shape can be uploaded, for example: I want these to display in a grid where every image is the same size and shape (in my case, square) – due to the nature of the images, I don’t want to use cropping and I don’t want any... read more
Adding two contextual filters (Content : nid)

Adding two contextual filters (Content : nid)

I want to display two type of contents : News and Events. So I added them in the filters criteria. This works great. Now I want them to be further filtered on the basis of the category the News and Events lie in. For example, I only want to display News and Events... read more
How to make select option works like a button?

How to process a multiple values field (comma separated) in a Rules Action?

I am using modules “SMS Framework”,Clickatell for sending message and I have configured all the settings which was required. I have also created a rule where node (Article) be saved and send a message. It is working good when I use single mobile number but... read more
Trying to filter content by two field values (either/or)

Trying to filter content by two field values (either/or)

I’m trying to filter published content by the values set inside of two fields (one or the other). Right now, I’m successfully filtering my content by one field: Contextual Filter If field_targetuser = logged in uid, than display content. However, I also... read more
How to make select option works like a button?

How can I extract and print specific field values from $page[‘content’] in page.tpl.php (vocabulary page)

I am trying to print some specific fields on a vocabulary term page in order to lay the page the way I want. <?php print render($page[‘content’]); ?> prints the entire content but I want to extract specific values like title, field_photo etc. so that... read more
How to make select option works like a button?

When do hook_views_data() and hook_views_data_alter() get called?

I’m working on a site I inherited that has a functioning hook_views_data_alter() implementation. I can see things in the Views editor that it has added. However, I cannot figure out how on earth to get that function to be called again so I can change the data. I... read more
How to make select option works like a button?

Use contextual filter global null to pass values to override field result

I come again with new question about Drupal Views and i hope you can help and explain me how to achieve this, I made a page view to display all my content (this works fine) with the following path: /car/%/%/% Now I want to get all the aliases of that path, for... read more
How to make select option works like a button?

How do I render form fields in my custom.tpl.php template?

Here’s my dilemma, I built a custom form-based module that allows a user to vote on a future conference location but I’m having a issue printing or rendering my form fields to have them display in my custom block template. eventvoting.module <?php /** *... read more
How to make select option works like a button?

Using git to fetch changes from testing version to live website

I am maintaining and developing a Drupal website and have a testing/development version of the site in a subfolder of drupal instalation. I started to learn git and I am wondering about how could I use it in my development process. I came up with following solution:... read more
How to make select option works like a button?

Check if form already failed validation

I added a validation hook to a node creation form. For my project, i need this validation only ONE time: basically i just check if a value already exists in the DB and i notify it to the user. If the user still submits the form, i must add it anyway. i would like to... read more
How to make select option works like a button?

Programmatically get menu links filtered by language

In Drupal 8, I’m trying to get my menu which has translated menu item filtered by a given language. So far, I was able to get my menu tree : $menu_parameters = $this->menuLinkTree->getCurrentRouteMenuTreeParameters(‘main’); $menu_tree =... read more
How to make select option works like a button?

How do I define a computed field equal to the concatenation of two fields of my custom entity?

I have a custom entity (Person) with these fields: ID, nom, prenom, telephoneportable, estactive, userID, created, changed. I created it with baseFieldDefinitions. I want to have a computed field nomprenom = nom .” “.prenom Here is the corresponding code:... read more
How to make select option works like a button?

Displaying the submitted values in a table

I created a custom form and after the form is submitted I need to display the submitted data in a table? This seems like a very simple problem. I am able to use dpm() and drupal_set_message() to display data submitted from the form in mymodule_form_submit($form,... read more
How to make select option works like a button?

How to edit and delete entityform submissions?

I’m using entityform for particular submission. I set the rule When submitting the entityform, its stored in particular content type. Its works well. But when edit and delete the particular entityform submissions its not work. So how to relate the entityform... read more
How to make select option works like a button?

How to automatically delete all product displays when a product is deleted?

To automatically delete the product displays when a product is deleted, is a feature of the module Auto Product Display, but I don’t need that module. Preferably using the Rules module, I would like to accomplish the same. An issue in drupal.org is present, but... read more
How to make select option works like a button?

How to use feeds tamper to set default value from importer node?

I’ve got a number of feeds that I want to be able to import regularly. I setup feeds and attached them to a content type, ex. “My Feeds” which imports into another content type, “Article”. I also need to make sure that when these feeds... read more
How to make select option works like a button?

How to eliminate direct access to files in private directory?

I have set up my Drupal 7 site for private files in a directory above root (../private). I also set my filefield on my node type to upload the image files to that private directory. I have two user roles: man and woman. Both user roles can create nodes of a certain... read more
How to make select option works like a button?

How to get selected Value in the listbox by using form api

I have created a form with fields titled State and City. After selecting the state’s appropriate city records, they will be loaded into city listbox. Until now they were working fine, but after clicking the submit button I am not able to store the city’s... read more