display moderation field in view filter - drupal

I have webform module in drupal 7.23.I have 4 fields in name,email,message and publish fields.publish field is displayed only for admin user and not displayed for anonymous user.
publish field is a select option.This webform field is not available in filter criteria.
I want to save the content as draft and display only after admin review ie) have to add filter criteria for publish field in view.
Now I want to publish filter is not available for filter criteria.
I want to display the content if publish field value is 1

Let me share my findings, it works for me according to your requirement.
Webforms' Select List won't work with views expose filter as it works with content type/taxonomy. See comment by webform contributor here
To achieve that follow these steps:
1st step I created a new component in the webform named as published? with the type Select options and set its default value as "no" (because it won't show to other user it'll be empty so they can't set an value the you can't filter submissions) and check the Private check box like this
2nd step Create a views page for webform submissions like this
3rd step Add relations using Webform submissions: Data and set up like this
4th step Add filter criteria using Webform submission data: Data field field, expose it, choose Grouped filters radio option, select widget type as select and set relationship and don't save it yet
5th step For the group filter, there is table below (scrrenshort) you can add your values like you add value while creating the Publish component in webform.
I hope this'd work for you. Thank

Related

How to dynamically change default value of the drop down field of the gravity forms depending on the selection before landing on the form page

I have a page with a pricing table:
plan A
plan B
plan C
I want to use only one gravity form with a drop down default value filled depending on what the user have selected.
For example, if the user selected 'plan B' from the pricing table, the form will show the drop down 'plan B' selected by default.
Can someone help me with this?
In Gravity Forms for your dropdown you will have a value. I found that as long as the value was one word it was easy to get it to be the default.
For you I would name each of your three things PlanA, PlanB, PlanC
Make sure show values is checked if you want it to be required.
Go over to the Advanced tab check the "Allow field to be populated dynamically" box and then for the parameter name enter a variable. I used default_value. Then on your different Plan names in your table you will need to add this. Plan A
where "planForm" is obviously the link of your page and the default_value is equal to the value of the dropdown item you wish to be default.

Drupal 7 DraggableViews order

I have 2 separate views for the image gallery having categorize using term.
One for admin(draggable) and second for anonymous user. Admin can change
order(weight) of the gallery.
I am using this weight in second views but this is not working properly
Even i have added SORT CRITERIA on **Draggableviews: Weight (asc)** in
both views.
Is there any way to add as a field weight so that i can debug this issue or any other solution
Only solution that worked for me was the following:
go to your content type/vocabulary
add a weight field (label: weight | machine name: weight | field type: integer
edit your sorting view and add sort criteria for your newly added weight field
edit your draggable views field and change "Handler" from Native to FieldAPI
under Field select your weight field
go to your content view and add the new weight field as you sort criteria
This is the only thing that worked for me. If it doesn't work immediately, just reorder a few items on your draggable view so that the ordering values are reset.
Hope this works for you too.
The draggableviews module doesn't use the weight field for sorting. If you have followed the instructions for using the draggableviews module you should have two views, 1 for sorting with the draggable items and 1 for displaying the sorted view. It is important that on both your views you should have the 'DraggableViews: Order' as the FIRST sort criteria.
As a final extra step, you'll go back to your regular page display for the view and add "DraggableViews: Order" at the Sort criteria section and place it as the first Sort criteria. For sorting order, choose "Ascending".
https://drupal.org/node/283498

Changing CCK field values from view list

I have a content type Task, where we create task for ourself or user and in that there is a drop down, which contains some taxonomy terms, which show the status of task.
Below this form I list the all the task for current user which shows some input values of content type task in some columns.
I want to show the status(CCK field) in a column as select box, which will show the current status of task and user can select some other status & submit it directly. So that user will not have to go to task node.
Is it possible ?
Thanks in advance :)
Upload - editablefield module
Enable it
Go to the view (or create view)
Add CCK field under content
Select Editable Field under "Format"

Drupal views exposed input as form select (/jumpmenu)

I have content type called news. I have a view thats lists all the news. But now I would like to filter those by year and type. User could select from select menu / dropdown the publish year (2010, 2011, 2012 so on) and also the type of the news (taxonymy terms).
I was playing around with views exposed but I only got a text input field. Can I somehow get a select menu instead of normal input field? And also how can I list all the publish years when news are published to that select menu?
Should this be done even with views?
====
PAGE
Filter dropdowns: -type- -year-
Press releaseses listed down here according the filters.
Select boxes will only be used in Views exposed filters when there is a finite number of possible values. In other words, if your field you want to filter on has something set in the 'allowed values' section you should have the option of a select box if you choose "FIELD NAME - Allowed Values" as the field to filter on in Views.
If your field has an unlimited amount of possible values, you could always write a custom module to create a block with a form that presents your select boxes and directs the user to the view (using the filter parameters of the view).

Drupal Views & Exposed Filter Dropdowns

I'm using Profile to add a "Department" field to user profiles.
I'm using Views to create a view of users, with "Department" being an Exposed Filter.
The Exposed Filter is a textfield. I'd like for it to be a select dropdown that is populated with all possible values.
Is anyone aware of a module that will alter Views filters, changing fields from textfields to select dropdowns?
Drupal 6. Views 2. The profile field is a single-line textfield (with autocomplete).
i had the same issue in a project
fields that are textboxes show be select box.
as attachment image shows in 'FILTER CRITERIA' choose your field
in 'Filter type to expose' part choose 'Grouped filters'
a table will be shown that you manually can add your data as options
this solution is good when you know your options
this is my RTL settings for expose a textbox filter
this is my RTL settings for expose a textbox options
and in UI - client side this field will be shown like this
What kind of profile field is "Department"? I'm assuming it's one of single-line textfield, multi-line textfield, checkbox or list selection. I only tested it with a list selection, but if you check "Force single" then the exposed filter will be a select dropdown.
Assuming you mean Drupal 6. The above is true with Views 2.x and 3.x on D6.
If you want to modify an existing filter, follow the accepted solution provided here.
If altering an existing filter does not satisfy your requirements, then this step-by-step tutorial will help you creating your own custom Views filter.

Resources