Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
3k views

How can I sort a View's exposed filter options alphabetically?

I have a custom module which uses hook_form_views_exposed_form_alter() to sort the options of a select list into alphabetical order. This appears to work because dmp($form) shows $form['...
Andrew's user avatar
  • 302
0 votes
1 answer
945 views

How to show a custom form in a block?

I have a custom form which currently shows on a page. The form is submitted via ajax and the view embedded is also updated via ajax. I do not want to show the form on a page. Instead I want to show it ...
Umair's user avatar
  • 441
0 votes
1 answer
2k views

Making text fields autocomplete in views exposed filters

I want to make a text field auto complete in a views exposed form. I tried using the following code but nothing happens(I don't see that blue icon in the text field): <?php function nk_menu() { ...
Nima's user avatar
  • 431
-1 votes
1 answer
1k views

How to add existing fields to a custom form?

I have a custom form which shows the title field and a view embedded into the form. Both form and the view are updated via Ajax. I am trying to add the body field, but it is not showing up. This is ...
Umair's user avatar
  • 441
5 votes
4 answers
2k views

I use jQuery to alter the exposed form select options. Got error: "An illegal choice has been detected." How to bypass validation?

I have a view that has three expose filters (Manufacturer, Type, Model), three options list (term reference to Printer vocabulary) . Vocabulary: Printer (3 levels) -- HP ---- xxx ---...
gilzero's user avatar
  • 6,037
3 votes
1 answer
3k views

Attach or embed node add form to a view

I want to attach or embed a node form to a view so that when a user submits the form, the view below the form will be updated in realtime via ajax. The form will be shown above the view. My views ...
Umair's user avatar
  • 441
1 vote
1 answer
4k views

Reload Javascript after ajax event

I have a module that uses a button to load an embed view everytime the button is clicked. // function to print builder view function workout_builder_template() { $viewName = 'builder_view'...
Andrae Browne's user avatar
0 votes
2 answers
77 views

Views callback work only once with advanced form block

this code work but the views is callback only once (reload only once), any idea to reload more than one time ? see in detail on drupal.org function modulename_form_alter (&$form, &$...
comcom's user avatar
  • 29
7 votes
4 answers
7k views

How do I embed a node creation form inside a view

I have a View with some fields and a couple of link items. What I want to do is when I click on the link items, a node creation form associated with link should appear inside the view (the AJAX way). ...
kmdhrm's user avatar
  • 944
0 votes
1 answer
246 views

How to alter the search api views exposed form field value?

I have a search api view. Which has an exposed some exposed filters. The exposed filters contains postal code, city and latlong field. The user will enter the city and postal code and then in the ...
Ahmad's user avatar
  • 2,845
-1 votes
1 answer
661 views

How to disable parent term options in select list?

I have a view with an exposed filter of taxonomy terms. The terms are displayed as a hierarchical structure in the select list. I want to disable the parent terms in the select list. How to do it in ...
Goldengalaxy's user avatar
0 votes
1 answer
4k views

How do I change submit URL for exposed search filter?

I've created view using Search API Views with two different displays. First Page display (by_terms) and with the following options: Page settings: Path:/taxonomy/term/% Contextual filters: Category: ...
kenorb's user avatar
  • 14.3k
1 vote
1 answer
710 views

Multiple instances of same form in views do not work properly

I have a funny problem with Drupal 7 and Views. I created programatically a simple form with two submit buttons (yes / no). This form is displayed on a full view of a node and when the 'yes' is ...
Pierre_colin's user avatar
4 votes
2 answers
7k views

Drupal 7 views exposed filter: Removing -Any- and sorting items

I am using Drupal 7.21 and views 3.7. I have date module installed. In one of my views, I want to give drop-down year as an exposed filter and it is working fine. I do have choices as -Any- 2012 2013 ...
cissharp's user avatar
  • 539
3 votes
2 answers
1k views

What hook function (is _form_alter correct?) do I use to alter the input submitted by the user into a views exposed filter form?

I'm developing a views exposed filter form for searching for items in given geographic locations. I want to restrict this to a particular country so that cities with the same name in other countries ...
therobyouknow's user avatar
1 vote
1 answer
2k views

Use form_alter to add placeholder text to a Views Exposed Filter min/max field

I have an exposed "List Price" field in a View using the "in between" operator (so that users can search for content between this price and that price), and I need to add the text "Min Price" and "Max ...
hockey2112's user avatar
  • 1,244
0 votes
1 answer
289 views

How do I add cross symbol in textbox?

I have a view with an exposed filter for the node titles. I want to add X in that exposed filter. I know html5 provides feature to have cross symbol when the input type is search. I tried changing #...
Milind's user avatar
  • 171
1 vote
2 answers
405 views

Front-end page to add content for a specific content type

I am new to Drupal and I am working on a page created by the Views module and I am displaying my content as a grid. As I already know it is possible to add content to my specific content type from ...
Dilhan Nakandala's user avatar
1 vote
3 answers
613 views

How to reduce options for units of measurement to just miles and km for proximity search

Using geofield with Views and exposed filters to the user to search for things on the map within a certain radius of a particular location. I only require miles and kilometres as units of measurement,...
therobyouknow's user avatar
0 votes
1 answer
1k views

how do I open a custom module form in colorbox popup? [duplicate]

I am creating a form in custom module, and I need to show this form in a view. How do I show this form in a color-box popup? I have created a custom block to render this form, but I don't understand ...
jsh's user avatar
  • 716
1 vote
2 answers
4k views

D7 Execute javascript on views exposed filters AJAX submit (Dropkick)

I need a tutorial on how to run a piece of javascript after the AJAX form of a views exposed filter group submits. The problem is with using the Dropkick javascript plugin to style some dropdowns. ...
emc's user avatar
  • 863
1 vote
2 answers
4k views

Building an advanced multicriteria search

I'm kinda new to Drupal and I would like some advises. I have a Drupal website, with a few nodes (1000 - 5000) of a particular content type, let's say a "House". This "House" content type has a few ...
Jean-Michel Garcia's user avatar
2 votes
1 answer
1k views

How to find out a node's comment status (open, closed) from node ID?

Having a view of comment fields here that is embedded into another view via Views Field View module. The comment view has a contextual filter: the nid. Works quite nice. Now I want to hide the view ...
leymannx's user avatar
  • 18.8k
1 vote
1 answer
2k views

Views form page with input fields

How can I make Views form page with such input fields? Such view can really help to change meanings of some node field all at once.
Dimetry's user avatar
  • 440
2 votes
2 answers
2k views

How to create a webform submission table with values from the form itself?

I find the current webform submission table completely inadequate when forms are submitted by anonymous users - you can't tell one from another other than by its submission date which not helpful in ...
user5013's user avatar
  • 1,497
3 votes
1 answer
228 views

Can a VBO form be integrated with the Commerce Add-to-Cart form to allow adding optional add-on products with checkboxes?

With VBO and Rules I can display a list of Commerce products with checkboxes and a button to add the checked products to the cart (see how). Is there a way to integrate these checkboxes with the ...
unor's user avatar
  • 763
0 votes
1 answer
513 views

VBO Pass Argument to Custom Action Function

I have a view that list entities. It has a VBO field on it for executing a few custom actions. I can get the actions working, but I need to add a field to the operations form on the view which lets ...
jhoffmcd's user avatar
  • 120
1 vote
1 answer
194 views

How to exposed custom profile fields in views

The custom fields were created using a custom form in a module, not user entities or Profile2. How can I expose these fields to views? My goal is to allow an admin to filter users by exposing those ...
Tabestan's user avatar
  • 109
1 vote
1 answer
2k views

A Multi-step Form to display Database Data at the End

I'm fairly new to Drupal but I'm building a site using Drupal 7. Most of the stuff is pretty standard Drupal things, but one of the things my stakeholders want is a tool that does the following (and I'...
Sage's user avatar
  • 2,463
4 votes
1 answer
449 views

How can I draw a donut chart based on the number of specific fields on a form?

Is there a module that can count results in a form, and then draw a donut chart like the following picture? Note that I'm actually using content types and the Views module to create such forms. So I'...
Ran's user avatar
  • 85
0 votes
1 answer
3k views

Altering views exposed form - Adding select list separator causes error

Problem I want to break the select list on my exposed form into chunks using select list dividers. However this breaks my search. Any attempt to search with values from that select list removes ...
Dominic Woodman's user avatar
3 votes
1 answer
170 views

Programmatically added comment form on node page doesn't work

I have attached a view which displays comments to basic page content type using EVA module. I've also implemented the following to have the "add comment" form displayed just above the comments list: /...
camcam's user avatar
  • 2,121
0 votes
1 answer
10k views

Notice: Trying to get property of non-object

I have created a module, and I am trying to use the following code: function mymodule_form_alter(&$form, &$form_state, $form_id) { if ($form_state['view']->name == 'album1') { /...
Hacker's user avatar
  • 3,024
-1 votes
2 answers
460 views

How i can change page with "next" previous" buttons in the same node

i want create something like that : and after clicking next page , the node doesn't change :
Salaktarus's user avatar
2 votes
1 answer
2k views

How to override exposed filters view

I have one form of exposed filters of view. I need to override few elements of that, like change options for select box dropdown and like that. For that I have created view, and used hook_form_alter, ...
Kalpesh Patel's user avatar
0 votes
0 answers
267 views

Views - Unable to set custom form field value in Exposed form

I have a view with 2 exposed filters . one is the start date and the other is the end date. I need to programatically control the end date filter based on a checkbox. I added a checkbox to the exposed ...
Bhuvana's user avatar
  • 661
2 votes
1 answer
5k views

Create dependent dropdown in views exposed filter

I've created a view of users. It includes two exposed filters as drop downs to filter the list. One is for the city and the other for the squadron. The squadron drop down is related to the cities as ...
Ben's user avatar
  • 1,030
1 vote
3 answers
651 views

Prevent hook_form_alter to works only on frontend not in admin?

I have used a hook_form_alter to alter a form fields value randomly and its working fine, but the problem is that when i open this webform in admin panel its just change the value which i dont. Its ...
Pramod Kumar Sharma's user avatar
2 votes
0 answers
401 views

Does AJAX callback functions work differently for BEF views?

I am breaking my head since last two days to implement dependent drop down list. I have followed so many examples in the internet, SE and examples project but for some reason the simple thing isn't ...
Dudepal's user avatar
  • 274
1 vote
1 answer
3k views

How to display, search, and edit form submissions from a table with WebForm?

I am very new to Drupal and I've been recently assigned a task to make a form for a single admin to register people and their info. It's basically a registration/contact form, except these people aren'...
Eric Ren's user avatar
0 votes
2 answers
2k views

Override Views Contextual Filter in View Exposed Form Validation

I'm using the Content:Nid contextual filter in my view (with exposed filters) and would like to dynamically set the value of this contextual filter from the exposed form validation callback. Is this ...
ovi's user avatar
  • 598
1 vote
1 answer
47 views

How do I embed a custom node creation form inside a view

I have these nodes : Company, Cars, Trucks (cars and truck have a taxonomy term to give it's type). Cars and Trucks have a field named Company wich refer to the Company node. So i can locate the ...
Kpone's user avatar
  • 503
0 votes
1 answer
524 views

Ability for user to flag or select multiple nodes from view listing

I am creating a page where I have a view listing about 100 nodes of a specific content type and then underneath that I have a contact form. When visitors (logged out users) come to my site I would ...
Dan's user avatar
  • 696
1 vote
1 answer
3k views

Adding class to form element via hook_form_alter for views exposed filter is not working

I have a Views exposed filter, for which I am trying to add a class via hook_form_alter() with the following code: $form['price']['#attributes'] = array('class' => array('price-hide')); ...
DanH's user avatar
  • 1,613
0 votes
3 answers
3k views

Make a Views form collapsible

I have a search form in my header. Instead of using the core search, I used a custom block that takes the search string and passes it to the Advanced Search page, built in Views, where users can ...
Mike's user avatar
  • 755
2 votes
1 answer
220 views

How to combine Views, Rules and EVA to record submission?

I have a Drupal 7 site and I'm using Views, Rules and EVA. I have a specific requirement that I am sure can be achieved with the modules, but I am having no joy configuring a working process. I have ...
MCG's user avatar
  • 49
2 votes
3 answers
336 views

I've created a Webform. Whats next?

I am completely new to Drupal. And I would really appreciate if someone could help me out here. I used the "WebForm" module, and created a form. The data went into the database perfectly fine, as it ...
He Hui's user avatar
  • 167
0 votes
2 answers
789 views

Exposed filter of a view embedded in a panel overriding a node form triggers node submission. How to prevent this?

I have a panel overriding the node/add form of a custom content-type in one pane and a view listing some nodes including 2 exposed filters to reduce the results of that list in another pane. Both, ...
Volker's user avatar
  • 1,370
2 votes
1 answer
115 views

Display term description below a field widget based on the selected option on node edit form

I am trying to show a block (or the term description) on the node edit form when a user selects the term. An example: User is creating a node with a "location" vocabulary. They select their state (...
Brandon's user avatar
  • 193
1 vote
1 answer
58 views

What to do when saving nodes one-by-one and bulk resaving give different results

I'm using the Location Taxonomize module with the Address Field module to create a vocabulary of node locations. I want to re-create the locations from scratch, and I have a term reference field ...
Patrick Kenny's user avatar